Updates for PHP Thames Valley

This commit is contained in:
Oliver Davies 2025-04-11 18:15:40 +01:00
parent ff651197b8
commit e80aee1deb
2 changed files with 45 additions and 63 deletions

View file

@ -4,4 +4,5 @@
{{ 'today'|date('Y') }} {{ 'today'|date('Y') }}
{{ 'today'|date('Y') - 2007 }} # 17 (years of experience) {{ 'today'|date('Y') - 2007 }} # 18 (years of experience)

View file

@ -1,5 +1,3 @@
.. footer:: @opdavies
Building static websites with Sculpin Building static websites with Sculpin
##################################### #####################################
@ -7,9 +5,11 @@ Building static websites with Sculpin
.. class:: titleslideinfo .. class:: titleslideinfo
Oliver Davies (@opdavies) Oliver Davies
.. page:: imagePage .. raw:: pdf
PageBreak imagePage
.. image:: images/druplicon.png .. image:: images/druplicon.png
:width: 10cm :width: 10cm
@ -17,11 +17,20 @@ Oliver Davies (@opdavies)
.. raw:: pdf .. raw:: pdf
PageBreak PageBreak
TextAnnotation "I primarily work with Drupal and have been a Drupal developer since 2007/8."
TextAnnotation "Drupal, WordPress, etc need PHP and a database to run."
TextAnnotation "Difficult for new Developers."
TextAnnotation "Complex for personal projects."
TextAnnotation "Hosting can be expensive."
.. image:: images/sculpin.png .. image:: images/sculpin.png
:width: 10cm :width: 10cm
.. page:: standardPage .. raw:: pdf
TextAnnotation "Sculpin - a static site generator written in PHP."
TextAnnotation "Not a Sculpin vs. x talk, but I'll make comparisons and comments based on my own experience."
PageBreak
What is a static website? What is a static website?
========================= =========================
@ -30,13 +39,13 @@ What is a static website?
.htaccess .htaccess
assets/images/od-logo.jpg assets/images/od-logo.jpg
bco/index.html
build/tailwind.css build/tailwind.css
call/index.html call/index.html
daily/2024/03/18/automated-drupal-11-compatibility-fixes/index.html daily/2024/03/18/automated-drupal-11-compatibility-fixes/index.html
drupal-upgrade/index.html drupal-upgrade/index.html
favicon.ico favicon.ico
index.html index.html
phpberks/index.html
podcast/19-sam-mortenson/index.html podcast/19-sam-mortenson/index.html
pricing/index.html pricing/index.html
talks/taking-flight-with-tailwind-css/index.html talks/taking-flight-with-tailwind-css/index.html
@ -44,6 +53,8 @@ What is a static website?
.. raw:: pdf .. raw:: pdf
TextAnnotation "Before I talk about static site generators, let's talk about static websites."
TextAnnotation "Some of the files from my website."
TextAnnotation "HTML, CSS, JS. No PHP or server-side code." TextAnnotation "HTML, CSS, JS. No PHP or server-side code."
TextAnnotation "How I started building websites." TextAnnotation "How I started building websites."
TextAnnotation "The things you usually have a CMS or framework generate." TextAnnotation "The things you usually have a CMS or framework generate."
@ -51,10 +62,12 @@ What is a static website?
What is Sculpin? What is Sculpin?
================ ================
* Static site generator * Static site generator.
* CLI tool * Developed by Beau Simensen.
* Built on Symfony components * Maintained by Kevin Boyd (beryllium).
* Markdown + Twig = Static HTML * CLI tool.
* Built on Symfony components.
* Markdown + Twig = Static HTML.
.. raw:: pdf .. raw:: pdf
@ -71,6 +84,7 @@ Why use a static site generator?
- Security. - Security.
- Performance. - Performance.
- Easy and cheap to host. - Easy and cheap to host.
- Fun vs. work.
.. raw:: pdf .. raw:: pdf
@ -81,7 +95,7 @@ Why use a static site generator?
What do I use it for? What do I use it for?
===================== =====================
* My personal website and Zettelkasten. * My personal website.
* Some client websites. * Some client websites.
* HTML prototypes and testing. * HTML prototypes and testing.
* Learning YAML and Twig (and some Symfony). * Learning YAML and Twig (and some Symfony).
@ -168,7 +182,6 @@ source/index.md
.. code-block:: .. code-block::
:include: code/index.md.txt :include: code/index.md.txt
:linenos:
source/index.md source/index.md
@ -176,7 +189,6 @@ source/index.md
.. code-block:: bash .. code-block:: bash
:include: code/index.md.txt :include: code/index.md.txt
:linenos:
:hl_lines: 1,2,3,4 :hl_lines: 1,2,3,4
source/index.md source/index.md
@ -184,7 +196,6 @@ source/index.md
.. code-block:: bash .. code-block:: bash
:include: code/index.md.txt :include: code/index.md.txt
:linenos:
:hl_lines: 2 :hl_lines: 2
source/index.md source/index.md
@ -192,7 +203,6 @@ source/index.md
.. code-block:: bash .. code-block:: bash
:include: code/index.md.txt :include: code/index.md.txt
:linenos:
:hl_lines: 3 :hl_lines: 3
source/index.md source/index.md
@ -200,7 +210,6 @@ source/index.md
.. code-block:: bash .. code-block:: bash
:include: code/index.md.txt :include: code/index.md.txt
:linenos:
:hl_lines: 6 :hl_lines: 6
output_dev/index.html output_dev/index.html
@ -208,14 +217,12 @@ output_dev/index.html
.. code-block:: html .. code-block:: html
:include: ./code/index.html.txt :include: ./code/index.html.txt
:linenos:
output_dev/index.html output_dev/index.html
===================== =====================
.. code-block:: html .. code-block:: html
:include: ./code/index.html.txt :include: ./code/index.html.txt
:linenos:
:hl_lines: 4 :hl_lines: 4
output_dev/index.html output_dev/index.html
@ -223,7 +230,6 @@ output_dev/index.html
.. code-block:: html .. code-block:: html
:include: ./code/index.html.txt :include: ./code/index.html.txt
:linenos:
:hl_lines: 7 :hl_lines: 7
Configuration Configuration
@ -239,7 +245,6 @@ Configuration
| |
.. code-block:: yaml .. code-block:: yaml
:linenos:
:include: code/configuration.txt :include: code/configuration.txt
Using on pages Using on pages
@ -265,7 +270,6 @@ YAML front matter
.. code-block:: yaml .. code-block:: yaml
:include: ./code/front-matter1.txt :include: ./code/front-matter1.txt
:linenos:
:hl_lines: 2 :hl_lines: 2
YAML front matter YAML front matter
@ -273,7 +277,6 @@ YAML front matter
.. code-block:: yaml .. code-block:: yaml
:include: ./code/front-matter1.txt :include: ./code/front-matter1.txt
:linenos:
:hl_lines: 3 :hl_lines: 3
YAML front matter YAML front matter
@ -281,7 +284,6 @@ YAML front matter
.. code-block:: yaml .. code-block:: yaml
:include: ./code/front-matter1.txt :include: ./code/front-matter1.txt
:linenos:
:hl_lines: 4 :hl_lines: 4
.. raw:: pdf .. raw:: pdf
@ -292,7 +294,6 @@ More front matter
================= =================
.. code-block:: yaml .. code-block:: yaml
:linenos:
:hl_lines: 5,6,7,8 :hl_lines: 5,6,7,8
--- ---
@ -309,7 +310,6 @@ Even more front matter
====================== ======================
.. code-block:: yaml .. code-block:: yaml
:linenos:
:hl_lines: 9,10 :hl_lines: 9,10
--- ---
@ -329,7 +329,6 @@ Using on pages
.. code-block:: twig .. code-block:: twig
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
.. raw:: pdf .. raw:: pdf
@ -340,7 +339,6 @@ Using on pages
.. code-block:: bash .. code-block:: bash
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
:hl_lines: 3 :hl_lines: 3
.. raw:: pdf .. raw:: pdf
@ -352,7 +350,6 @@ Using on pages
.. code-block:: bash .. code-block:: bash
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
:hl_lines: 4,5,6 :hl_lines: 4,5,6
.. raw:: pdf .. raw:: pdf
@ -364,7 +361,6 @@ Using on pages
.. code-block:: bash .. code-block:: bash
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
:hl_lines: 9,12 :hl_lines: 9,12
.. raw:: pdf .. raw:: pdf
@ -376,7 +372,6 @@ Using on pages
.. code-block:: bash .. code-block:: bash
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
:hl_lines: 10 :hl_lines: 10
Using on pages Using on pages
@ -384,7 +379,6 @@ Using on pages
.. code-block:: bash .. code-block:: bash
:include: ./code/front-matter-on-pages.txt :include: ./code/front-matter-on-pages.txt
:linenos:
:hl_lines: 11 :hl_lines: 11
.. raw:: pdf .. raw:: pdf
@ -396,14 +390,12 @@ Layouts
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-base.txt :include: ./code/layout-base.txt
:linenos:
Layouts Layouts
======= =======
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-base.txt :include: ./code/layout-base.txt
:linenos:
:hl_lines: 4,6 :hl_lines: 4,6
Layouts Layouts
@ -411,7 +403,6 @@ Layouts
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-base.txt :include: ./code/layout-base.txt
:linenos:
:hl_lines: 9 :hl_lines: 9
Layouts Layouts
@ -419,14 +410,12 @@ Layouts
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-page.txt :include: ./code/layout-page.txt
:linenos:
Layouts Layouts
======= =======
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-page.txt :include: ./code/layout-page.txt
:linenos:
:hl_lines: 3 :hl_lines: 3
Layouts Layouts
@ -434,7 +423,6 @@ Layouts
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-page.txt :include: ./code/layout-page.txt
:linenos:
:hl_lines: 5,7 :hl_lines: 5,7
Layouts Layouts
@ -442,7 +430,6 @@ Layouts
.. code-block:: twig .. code-block:: twig
:include: ./code/layout-page.txt :include: ./code/layout-page.txt
:linenos:
:hl_lines: 6 :hl_lines: 6
Includes Includes
@ -480,14 +467,12 @@ Accessing custom content types
.. code-block:: yaml .. code-block:: yaml
:include: ./code/content-types.txt :include: ./code/content-types.txt
:linenos:
Accessing custom content types Accessing custom content types
============================== ==============================
.. code-block:: yaml .. code-block:: yaml
:include: ./code/content-types.txt :include: ./code/content-types.txt
:linenos:
:hl_lines: 4,5 :hl_lines: 4,5
Accessing custom content types Accessing custom content types
@ -495,7 +480,6 @@ Accessing custom content types
.. code-block:: yaml .. code-block:: yaml
:include: ./code/content-types.txt :include: ./code/content-types.txt
:linenos:
:hl_lines: 8,9,10 :hl_lines: 8,9,10
.. raw:: pdf .. raw:: pdf
@ -539,7 +523,6 @@ Making things more dynamic
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-1.txt :include: ./code/twig-1.txt
:linenos:
:hl_lines: 7 :hl_lines: 7
.. raw:: pdf .. raw:: pdf
@ -547,7 +530,6 @@ Making things more dynamic
PageBreak PageBreak
.. code-block:: twig .. code-block:: twig
:linenos:
--- ---
title: Daily Email Archive title: Daily Email Archive
@ -561,7 +543,7 @@ Making things more dynamic
| |
| |
This is an archive of the 599 email messages I have sent to my daily email list since the 12th of August, 2022. This is an archive of the 775 email messages I have sent to my daily email list since the 12th of August, 2022.
.. raw:: pdf .. raw:: pdf
@ -571,7 +553,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: php .. code-block:: php
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:end-before: // end yaml :end-before: // end yaml
:linenos:
.. raw:: pdf .. raw:: pdf
@ -579,7 +560,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:linenos:
:start-after: // start twig :start-after: // start twig
.. raw:: pdf .. raw:: pdf
@ -589,7 +569,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:start-after: // start twig :start-after: // start twig
:linenos:
:hl_lines: 1 :hl_lines: 1
.. raw:: pdf .. raw:: pdf
@ -599,7 +578,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:hl_lines: 3,7 :hl_lines: 3,7
:linenos:
:start-after: // start twig :start-after: // start twig
.. raw:: pdf .. raw:: pdf
@ -610,7 +588,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:start-after: // start twig :start-after: // start twig
:linenos:
:hl_lines: 4,6 :hl_lines: 4,6
.. raw:: pdf .. raw:: pdf
@ -620,7 +597,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:start-after: // start twig :start-after: // start twig
:linenos:
:hl_lines: 5 :hl_lines: 5
.. raw:: pdf .. raw:: pdf
@ -630,7 +606,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: twig .. code-block:: twig
:include: ./code/twig-2.txt :include: ./code/twig-2.txt
:start-after: // start twig :start-after: // start twig
:linenos:
:hl_lines: 9 :hl_lines: 9
.. raw:: pdf .. raw:: pdf
@ -639,7 +614,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-3.txt :include: ./code/twig-3.txt
:linenos:
.. raw:: pdf .. raw:: pdf
@ -647,7 +621,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-3.txt :include: ./code/twig-3.txt
:linenos:
:hl_lines: 1,3,15 :hl_lines: 1,3,15
.. raw:: pdf .. raw:: pdf
@ -656,7 +629,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-3.txt :include: ./code/twig-3.txt
:linenos:
:hl_lines: 5 :hl_lines: 5
.. raw:: pdf .. raw:: pdf
@ -665,7 +637,6 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-3.txt :include: ./code/twig-3.txt
:linenos:
:hl_lines: 9,11 :hl_lines: 9,11
.. raw:: pdf .. raw:: pdf
@ -674,16 +645,19 @@ This is an archive of the 599 email messages I have sent to my daily email list
.. code-block:: javascript .. code-block:: javascript
:include: ./code/twig-3.txt :include: ./code/twig-3.txt
:linenos:
:hl_lines: 10 :hl_lines: 10
.. page:: titlePage .. raw:: pdf
PageBreak titlePage
.. class:: centredtitle .. class:: centredtitle
Demo Demo
.. page:: standardPage .. raw:: pdf
PageBreak standardPage
Extending Sculpin Extending Sculpin
================= =================
@ -699,12 +673,16 @@ Extending Sculpin
tags: tags:
- { name: twig.extension } - { name: twig.extension }
.. page:: imagePage .. raw:: pdf
PageBreak imagePage
.. image:: images/packagist.png .. image:: images/packagist.png
:width: 22cm :width: 22cm
.. page:: standardPage .. raw:: pdf
PageBreak standardPage
.. code-block:: php .. code-block:: php
@ -732,11 +710,14 @@ References:
| |
https://www.oliverdavies.uk/phpberks * https://sculpin.io
* https://github.com/sculpin/sculpin
* https://code.oliverdavies.uk/opdavies/sculpin-demo
* https://code.oliverdavies.uk/opdavies/oliverdavies.uk
| |
Me: Me:
* https://www.oliverdavies.uk * https://www.oliverdavies.uk
* ``@opdavies`` * ``@opdavies@mastodon.social``