From 85307413370224dbf6d6f7fefe586b025b61e1e0 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sun, 11 Feb 2024 19:34:27 +0100 Subject: [PATCH] Rename subpages to sections --- .eleventy.js | 4 ++-- src/_includes/hero.liquid | 8 ++++---- src/_includes/page.liquid | 8 ++++---- src/_includes/partials/navigation.liquid | 2 +- src/pages/index.liquid | 6 +++--- src/pages/{subpages => sections}/competences.liquid | 0 src/pages/{subpages => sections}/download.liquid | 0 src/pages/{subpages => sections}/experiences.liquid | 0 src/pages/{subpages => sections}/hero.liquid | 0 src/pages/{subpages => sections}/projects.liquid | 0 src/pages/sections/sections.11tydata.js | 3 +++ src/pages/subpages/subpages.11tydata.js | 4 ---- 12 files changed, 17 insertions(+), 18 deletions(-) rename src/pages/{subpages => sections}/competences.liquid (100%) rename src/pages/{subpages => sections}/download.liquid (100%) rename src/pages/{subpages => sections}/experiences.liquid (100%) rename src/pages/{subpages => sections}/hero.liquid (100%) rename src/pages/{subpages => sections}/projects.liquid (100%) create mode 100644 src/pages/sections/sections.11tydata.js delete mode 100644 src/pages/subpages/subpages.11tydata.js diff --git a/.eleventy.js b/.eleventy.js index d5edb79..3907d73 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -7,8 +7,8 @@ module.exports = config => { config.addLayoutAlias('base', 'layouts/base.html'); - config.addCollection("subpages", (collectionApi) => { - const sections = collectionApi.getFilteredByGlob("./src/pages/subpages/**") + config.addCollection("sections", (collectionApi) => { + const sections = collectionApi.getFilteredByGlob("./src/pages/sections/**") .sort((a, b) => a.data.order - b.data.order); process.env.DEBUG && console.log(inspect(sections)); return sections; diff --git a/src/_includes/hero.liquid b/src/_includes/hero.liquid index b0b4484..796d88c 100644 --- a/src/_includes/hero.liquid +++ b/src/_includes/hero.liquid @@ -1,8 +1,8 @@ -
+
-

{% if subpage.data.displayedTitle %}{{ subpage.data.displayedTitle }}{% else %}{{ subpage.data.title }}{% endif %}

-

{{subpage.data.description}}

- {{ subpage.templateContent }} +

{% if section.data.displayedTitle %}{{ section.data.displayedTitle }}{% else %}{{ section.data.title }}{% endif %}

+

{{section.data.description}}

+ {{ section.templateContent }} {% render 'partials/components/socials', socials: author.socials, mail: author.mail, showLabel: true %}
\ No newline at end of file diff --git a/src/_includes/page.liquid b/src/_includes/page.liquid index a658fac..6efe1d6 100644 --- a/src/_includes/page.liquid +++ b/src/_includes/page.liquid @@ -1,6 +1,6 @@ -
- {% if subpage.data.showTitle != false %} -

{% if subpage.data.displayedTitle %}{{ subpage.data.displayedTitle }}{% else %}{{ subpage.data.title }}{% endif %}

+
+ {% if section.data.showTitle != false %} +

{% if section.data.displayedTitle %}{{ section.data.displayedTitle }}{% else %}{{ section.data.title }}{% endif %}

{% endif %} - {{ subpage.templateContent }} + {{ section.templateContent }}
\ No newline at end of file diff --git a/src/_includes/partials/navigation.liquid b/src/_includes/partials/navigation.liquid index 73f4e62..b548370 100644 --- a/src/_includes/partials/navigation.liquid +++ b/src/_includes/partials/navigation.liquid @@ -1,6 +1,6 @@