refactor: migrate tags and sitemap to /blog subdirectory

pull/1/head
Nicolas Doby 2022-11-09 10:00:38 +01:00
parent 782f466ee6
commit ef6277b65c
6 changed files with 4 additions and 31 deletions

View File

@ -1,7 +1,7 @@
<div class="title">Catégories</div> <div class="title">Catégories</div>
<ul class="tags"> <ul class="tags">
{% for tag in collections.all | getAllTags | filterTagList %} {% for tag in collections.all | getAllTags | filterTagList %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {% set tagUrl %}/blog/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a></li> <li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -15,7 +15,7 @@
<body class="container"> <body class="container">
<header class="main-header"> <header class="main-header">
<div> <div>
<a class="main-header-logo" href="/"> <a class="main-header-logo" href="/blog">
<img src="/images/logo.svg" alt="IT's on us" width="165" height="33"> <img src="/images/logo.svg" alt="IT's on us" width="165" height="33">
Blog Blog
</a> </a>

View File

@ -1,18 +0,0 @@
---
layout: home.njk
permalink: 404.html
eleventyExcludeFromCollections: true
---
<div class="main-content">
<p>Cette page n'existe pas !</p>
<p>ous avez fait fausse route ¯\_(ツ)_/¯</p>
<p><a href="/">Aller à la page daccueil</a></p>
</div>
<aside class="right-side">
{% include "tagslist.njk" %}
{% include "other_links.njk" %}
</aside>

View File

@ -1,5 +1,5 @@
--- ---
permalink: /sitemap.xml permalink: /blog/sitemap.xml
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>

View File

@ -12,7 +12,7 @@ pagination:
layout: home.njk layout: home.njk
eleventyComputed: eleventyComputed:
title: Tags “{{ tag }}” title: Tags “{{ tag }}”
permalink: /tags/{{ tag | slugify }}/ permalink: /blog/tags/{{ tag | slugify }}/
--- ---
<div class="main-content"> <div class="main-content">
<h1>#{{ tag }}</h1> <h1>#{{ tag }}</h1>

View File

@ -1,9 +0,0 @@
---
permalink: '/robots.txt'
eleventyExcludeFromCollections: true
---
User-agent: *
Allow: /
Sitemap: {{ site.url }}/sitemap.xml