Updates for PHP Berkshire
This commit is contained in:
parent
d2530a138a
commit
43b8fdfd9c
|
@ -8,4 +8,3 @@ use:
|
||||||
{% for email in data.daily_emails %}
|
{% for email in data.daily_emails %}
|
||||||
<p>{{ email.title }}</p>
|
<p>{{ email.title }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,3 @@ layout: post
|
||||||
title: New blog post
|
title: New blog post
|
||||||
draft: yes
|
draft: yes
|
||||||
---
|
---
|
||||||
|
|
||||||
# My new blog post
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
.
|
app/
|
||||||
├── app
|
config/
|
||||||
│ ├── config
|
sculpin_kernel.yml
|
||||||
│ │ ├── sculpin_kernel.yml
|
sculpin_site.yml
|
||||||
│ │ └── sculpin_site.yml
|
composer.json
|
||||||
├── composer.json
|
composer.lock
|
||||||
├── composer.lock
|
output_dev/
|
||||||
├── output_dev
|
output_prod/
|
||||||
├── output_prod
|
source/
|
||||||
├── source
|
_includes/
|
||||||
│ ├── _includes
|
_templates/
|
||||||
│ ├── _templates
|
index.md
|
||||||
│ └── index.md
|
vendor/
|
||||||
└── vendor
|
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
{{ 'today'|date('Y') }}
|
{{ 'today'|date('Y') }}
|
||||||
|
|
||||||
{{ 'today'|date('Y') - 2007 }} # 17
|
{{ 'today'|date('Y') - 2007 }} # 17 (years of experience)
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
---
|
---
|
||||||
title: Building Static Websites with Sculpin
|
title: Building Static Websites with Sculpin
|
||||||
events:
|
events:
|
||||||
-
|
- name: PHP Berkshire
|
||||||
name: BrumPHP
|
date: 2024-08-28
|
||||||
|
location: Reading, UK
|
||||||
|
url: https://www.meetup.com/php-berkshire/events/301850284
|
||||||
|
- name: BrumPHP
|
||||||
date: 2024-05-23
|
date: 2024-05-23
|
||||||
location: Birmingham, UK
|
location: Birmingham, UK
|
||||||
url: https://www.eventbrite.com/e/brumphp-23rd-may-2024-tickets-803037766577
|
url: https://www.eventbrite.com/e/brumphp-23rd-may-2024-tickets-803037766577
|
||||||
-
|
|
||||||
name: PHP South West
|
|
||||||
date: 2024-02-14
|
|
||||||
location: Bristol, UK
|
|
||||||
url: https://www.meetup.com/php-sw/events/298880313
|
|
||||||
---
|
---
|
||||||
// end yaml
|
// end yaml
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
||||||
|
|
||||||
{% if talks is not empty %}
|
{% if talks is not empty %}
|
||||||
<section class="mt-10">
|
<section>
|
||||||
<h2 class="text-2xl font-bold">Talks
|
<h2>Talks by {{ page.name }}</h2>
|
||||||
<span class="sr-only"> by {{ page.name }}</span></h2>
|
|
||||||
|
|
||||||
<div class="mt-6">
|
<div>
|
||||||
<ul class="pl-4 list-disc">
|
<ul>
|
||||||
{% for talk in talks %}
|
{% for talk in talks %}
|
||||||
<li>
|
<li><a href="#0">{{ talk.title }}</a></li>
|
||||||
<a class="hover:underline" href="#0">{{ talk.title }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,6 +9,12 @@ Building static websites with Sculpin
|
||||||
|
|
||||||
Oliver Davies (@opdavies)
|
Oliver Davies (@opdavies)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. class:: centred
|
||||||
|
|
||||||
|
https://opdavi.es/phpberks
|
||||||
|
|
||||||
.. page:: imagePage
|
.. page:: imagePage
|
||||||
|
|
||||||
.. image:: images/druplicon.png
|
.. image:: images/druplicon.png
|
||||||
|
@ -23,6 +29,31 @@ Oliver Davies (@opdavies)
|
||||||
|
|
||||||
.. page:: standardPage
|
.. page:: standardPage
|
||||||
|
|
||||||
|
What is a static website?
|
||||||
|
=========================
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
.htaccess
|
||||||
|
assets/images/od-logo.jpg
|
||||||
|
build/tailwind.css
|
||||||
|
call/index.html
|
||||||
|
daily/2024/03/18/automated-drupal-11-compatibility-fixes/index.html
|
||||||
|
drupal-upgrade/index.html
|
||||||
|
favicon.ico
|
||||||
|
index.html
|
||||||
|
phpberks/index.html
|
||||||
|
podcast/19-sam-mortenson/index.html
|
||||||
|
pricing/index.html
|
||||||
|
talks/taking-flight-with-tailwind-css/index.html
|
||||||
|
talks/tdd-test-driven-drupal/index.html
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "HTML, CSS, JS. No PHP or server-side code."
|
||||||
|
TextAnnotation "How I started building websites."
|
||||||
|
TextAnnotation "The things you usually have a CMS or framework generate."
|
||||||
|
|
||||||
What is Sculpin?
|
What is Sculpin?
|
||||||
================
|
================
|
||||||
|
|
||||||
|
@ -42,18 +73,21 @@ Why use a static site generator?
|
||||||
================================
|
================================
|
||||||
|
|
||||||
- Rapid development.
|
- Rapid development.
|
||||||
|
- Templating.
|
||||||
- Security.
|
- Security.
|
||||||
- Performance.
|
- Performance.
|
||||||
- Easy and cheap to host.
|
- Easy and cheap to host.
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
|
TextAnnotation "Leveraging templating features, such as conditionals, loops, partials and includes, template inheritance."
|
||||||
TextAnnotation "Static websites are fast and secure as they don't have a database and only need a simple hosting environment with a basic web server."
|
TextAnnotation "Static websites are fast and secure as they don't have a database and only need a simple hosting environment with a basic web server."
|
||||||
|
TextAnnotation "Works with a simple Apache, Nginx or Caddy server, or with services like Vercel and Netlify."
|
||||||
|
|
||||||
What do I use it for?
|
What do I use it for?
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
* My personal website.
|
* My personal website and Zettelkasten.
|
||||||
* 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).
|
||||||
|
@ -92,18 +126,18 @@ Using Sculpin
|
||||||
TextAnnotation "The file structure of a Sculpin project."
|
TextAnnotation "The file structure of a Sculpin project."
|
||||||
PageBreak
|
PageBreak
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: bash
|
||||||
:include: ./code/project-structure.txt
|
:include: ./code/project-structure.txt
|
||||||
:hl_lines: 6,7,14
|
:hl_lines: 5,6,13
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
TextAnnotation "PHP-based project."
|
TextAnnotation "PHP-based project."
|
||||||
PageBreak
|
PageBreak
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: bash
|
||||||
:include: ./code/project-structure.txt
|
:include: ./code/project-structure.txt
|
||||||
:hl_lines: 2,3,4,5
|
:hl_lines: 1,2,3,4
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
|
@ -112,16 +146,16 @@ Using Sculpin
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
:include: ./code/project-structure.txt
|
:include: ./code/project-structure.txt
|
||||||
:hl_lines: 10,11,12,13
|
:hl_lines: 9,10,11,12
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
TextAnnotation "Source files."
|
TextAnnotation "Source files."
|
||||||
PageBreak
|
PageBreak
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: bash
|
||||||
:include: ./code/project-structure.txt
|
:include: ./code/project-structure.txt
|
||||||
:hl_lines: 8,9
|
:hl_lines: 7,8
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
|
@ -138,7 +172,7 @@ Generate a site
|
||||||
source/index.md
|
source/index.md
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. code-block:: markdown
|
.. code-block::
|
||||||
:include: code/index.md.txt
|
:include: code/index.md.txt
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
|
@ -146,7 +180,7 @@ source/index.md
|
||||||
source/index.md
|
source/index.md
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. code-block:: markdown
|
.. code-block:: bash
|
||||||
:include: code/index.md.txt
|
:include: code/index.md.txt
|
||||||
:linenos:
|
:linenos:
|
||||||
:hl_lines: 1,2,3,4
|
:hl_lines: 1,2,3,4
|
||||||
|
@ -154,7 +188,7 @@ source/index.md
|
||||||
source/index.md
|
source/index.md
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. code-block:: markdown
|
.. code-block:: bash
|
||||||
:include: code/index.md.txt
|
:include: code/index.md.txt
|
||||||
:linenos:
|
:linenos:
|
||||||
:hl_lines: 2
|
:hl_lines: 2
|
||||||
|
@ -162,7 +196,7 @@ source/index.md
|
||||||
source/index.md
|
source/index.md
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. code-block:: markdown
|
.. code-block:: bash
|
||||||
:include: code/index.md.txt
|
:include: code/index.md.txt
|
||||||
:linenos:
|
:linenos:
|
||||||
:hl_lines: 3
|
:hl_lines: 3
|
||||||
|
@ -170,7 +204,7 @@ source/index.md
|
||||||
source/index.md
|
source/index.md
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. code-block:: markdown
|
.. code-block:: bash
|
||||||
:include: code/index.md.txt
|
:include: code/index.md.txt
|
||||||
:linenos:
|
:linenos:
|
||||||
:hl_lines: 6
|
:hl_lines: 6
|
||||||
|
@ -258,7 +292,7 @@ YAML front matter
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
TextAnnotation "Draft pages aren't generated when ENV=prod".
|
TextAnnotation "Draft pages aren't generated when env=prod".
|
||||||
|
|
||||||
More front matter
|
More front matter
|
||||||
=================
|
=================
|
||||||
|
@ -277,8 +311,6 @@ More front matter
|
||||||
- sculpin
|
- sculpin
|
||||||
---
|
---
|
||||||
|
|
||||||
# My new blog post
|
|
||||||
|
|
||||||
Even more front matter
|
Even more front matter
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
@ -298,8 +330,6 @@ Even more front matter
|
||||||
foo: bar
|
foo: bar
|
||||||
---
|
---
|
||||||
|
|
||||||
# My new blog post
|
|
||||||
|
|
||||||
Using on pages
|
Using on pages
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -515,6 +545,7 @@ 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
|
||||||
|
@ -524,6 +555,7 @@ Making things more dynamic
|
||||||
.. 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
|
||||||
|
|
||||||
|
@ -531,6 +563,7 @@ Making things more dynamic
|
||||||
|
|
||||||
.. 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
|
||||||
|
@ -540,6 +573,7 @@ Making things more dynamic
|
||||||
.. 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
|
||||||
|
@ -549,6 +583,7 @@ Making things more dynamic
|
||||||
.. 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
|
||||||
|
@ -559,6 +594,7 @@ Making things more dynamic
|
||||||
.. 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
|
||||||
|
@ -568,6 +604,7 @@ Making things more dynamic
|
||||||
.. 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
|
||||||
|
@ -577,6 +614,7 @@ Making things more dynamic
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
: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
|
||||||
|
@ -585,6 +623,7 @@ Making things more dynamic
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
:include: ./code/twig-3.txt
|
:include: ./code/twig-3.txt
|
||||||
|
:linenos:
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
|
@ -592,7 +631,8 @@ Making things more dynamic
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
:include: ./code/twig-3.txt
|
:include: ./code/twig-3.txt
|
||||||
:hl_lines: 1,3,18
|
:linenos:
|
||||||
|
:hl_lines: 1,3,15
|
||||||
|
|
||||||
.. raw:: pdf
|
.. raw:: pdf
|
||||||
|
|
||||||
|
@ -600,7 +640,26 @@ Making things more dynamic
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
:include: ./code/twig-3.txt
|
:include: ./code/twig-3.txt
|
||||||
:hl_lines: 5,6,10,11,12,13,14
|
:linenos:
|
||||||
|
:hl_lines: 5
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:linenos:
|
||||||
|
:hl_lines: 9,11
|
||||||
|
|
||||||
|
.. raw:: pdf
|
||||||
|
|
||||||
|
PageBreak
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
:include: ./code/twig-3.txt
|
||||||
|
:linenos:
|
||||||
|
:hl_lines: 10
|
||||||
|
|
||||||
.. page:: titlePage
|
.. page:: titlePage
|
||||||
|
|
||||||
|
@ -655,10 +714,9 @@ Thanks!
|
||||||
|
|
||||||
References:
|
References:
|
||||||
|
|
||||||
* https://www.oliverdavies.uk/brumphp
|
|
|
||||||
* https://sculpin.io
|
|
||||||
* https://github.com/opdavies/phpsw-sculpin-demo
|
https://www.oliverdavies.uk/phpberks
|
||||||
* https://github.com/opdavies/oliverdavies.uk
|
|
||||||
|
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue