diff --git a/app/config/sculpin_kernel.yml b/app/config/sculpin_kernel.yml index 7b459e5c..7856fedc 100644 --- a/app/config/sculpin_kernel.yml +++ b/app/config/sculpin_kernel.yml @@ -1,11 +1,16 @@ sculpin_content_types: - daily_emails: - permalink: /archive/:year/:month/:day/:basename/ - pages: - permalink: /:basename/ - podcast_episodes: - permalink: /podcast/:basename/ - posts: - permalink: /blog/:basename/ - talks: - permalink: /talks/:basename/ + daily_emails: + permalink: /archive/:year/:month/:day/:basename/ + pages: + permalink: /:basename/ + podcast_episodes: + permalink: /podcast/:basename/ + posts: + permalink: /blog/:basename/ + talks: + permalink: /talks/:basename/ + +services: + App\Opdavies\TwigExtension\OpdaviesTwigExtension: + tags: + - { name: twig.extension } diff --git a/composer.json b/composer.json index ca66df3e..1d5c2542 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,10 @@ "config": { "allow-plugins": { "sculpin/sculpin-theme-composer-plugin": true - } - } + } + }, + "autoload": { + "psr-4": { + "App\\": "src" } + } } diff --git a/source/_includes/about-me.html.twig b/source/_includes/about-me.html.twig index 9af1501b..283a55cd 100644 --- a/source/_includes/about-me.html.twig +++ b/source/_includes/about-me.html.twig @@ -10,7 +10,7 @@
-

I'm an Acquia-certified Drupal Triple Expert with {{ macros.yearsExperience }} years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.

+

I'm an Acquia-certified Drupal Triple Expert with {{ get_years_of_experience() }} years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.

diff --git a/source/_includes/macros.html.twig b/source/_includes/macros.html.twig index 3723faa7..802cfcdf 100644 --- a/source/_includes/macros.html.twig +++ b/source/_includes/macros.html.twig @@ -2,7 +2,3 @@ {% macro dailiesCount(dailies) %} {{- dailies|length|round(-1, 'floor') -}}+ {% endmacro %} - -{% macro yearsExperience() %} - {{- today|date('Y') - 2007 -}} -{% endmacro %} diff --git a/source/_pages/call.html.twig b/source/_pages/call.html.twig index 9e36e9b4..0acf4296 100644 --- a/source/_pages/call.html.twig +++ b/source/_pages/call.html.twig @@ -32,7 +32,7 @@ faqs: {# Fix #} -

As a professional Software Developer and Consultant with {{ macros.yearsExperience }} years of Drupal and PHP experience, I have a lot of knowledge that I use to help customers and their projects.

+

As a professional Software Developer and Consultant with {{ get_years_of_experience() }} years of Drupal and PHP experience, I have a lot of knowledge that I use to help customers and their projects.

{# 1st call to action #} @@ -92,7 +92,7 @@ faqs:

Who am I?