From f2c7c544c16ad215441f71b3100b24dd71c47b0b Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 9 Nov 2021 00:00:14 +0100 Subject: [PATCH] make internal stuff relativ --- _config.yml | 4 ++-- _data/general/footer.yml | 10 +++++----- _includes/footer.html | 2 +- _includes/link.html | 7 +++++++ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 _includes/link.html diff --git a/_config.yml b/_config.yml index 63fd64ea..29e9b291 100644 --- a/_config.yml +++ b/_config.yml @@ -10,8 +10,8 @@ description: >- line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. -baseurl: "/home.invenhost.com" # the subpath of your site, e.g. /blog # TODO change when in prod -url: "" # the base hostname & protocol for your site, e.g. http://example.com +baseurl: "/home.invenhost.com" +url: """ plugins: diff --git a/_data/general/footer.yml b/_data/general/footer.yml index 40467f84..a1749615 100644 --- a/_data/general/footer.yml +++ b/_data/general/footer.yml @@ -40,12 +40,12 @@ - title: Sitemap cats: - name: Home - link: / + internal: '' - name: For Maker - link: /maker + internal: maker - name: For Business - link: /business + internal: business - name: For Education - link: /education + internal: education - name: About - link: /about + internal: about diff --git a/_includes/footer.html b/_includes/footer.html index 1044ca1d..fc119a84 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -17,7 +17,7 @@ diff --git a/_includes/link.html b/_includes/link.html new file mode 100644 index 00000000..2a2e31b8 --- /dev/null +++ b/_includes/link.html @@ -0,0 +1,7 @@ +{% if include.item.site %} + {{ site[include.item.site] }} +{% elsif include.item.internal %} + {{ include.item.internal | relativurl }} +{% else %} + {{ include.item.link }} +{% endif %} \ No newline at end of file