Mise à jour effectuée, merci de nous signaler tout dysfonctionnement ! | Upgrade done, please let us know about any dysfunction!

Commit 4b626a7f authored by BorisPAING's avatar BorisPAING

Gestion de la génération du fichier index.html

parent 01d050a0
......@@ -79,65 +79,67 @@ INTRASITE_LINK_REGEX = '[{|](?P<what>.*?)[|}]'
FILENAME_METADATA = r'(?P<file_name>.*)'
PATH_METADATA = r'(?P<path>.*)'
INDEX_SLUG = 'blog'
BLOG_SLUG = 'actus'
IMPROVE_SITE_SLUG = 'contribuer/ameliorer-le-site'
STATIC_SAVE_AS = '{path}'
DIRECT_TEMPLATES = ['index', 'categories', 'authors', 'archives', 'search', 'tags']
if PRETTY_URLS :
PAGE_SAVE_AS = '{slug}/index.html'
PAGE_LANG_SAVE_AS = '{slug}-{lang}/index.html'
ARTICLE_SAVE_AS = INDEX_SLUG + '/{category}/{slug}/index.html'
ARTICLE_LANG_SAVE_AS = INDEX_SLUG + '/{category}/{slug}-{lang}/index.html'
INDEX_SAVE_AS = INDEX_SLUG + '/index.html' # Defines to what path we want index.html template to be output
CATEGORIES_SAVE_AS = INDEX_SLUG + '/categories/index.html'
CATEGORY_SAVE_AS = INDEX_SLUG + '/{slug}/index.html'
TAGS_SAVE_AS = INDEX_SLUG + '/etiquettes/index.html'
TAG_SAVE_AS = INDEX_SLUG + '/etiquettes/{slug}/index.html'
AUTHORS_SAVE_AS = INDEX_SLUG + '/auteurs/index.html'
AUTHOR_SAVE_AS = INDEX_SLUG + '/auteurs/{slug}/index.html'
INDEX_SAVE_AS = BLOG_SLUG + '/index.html'
ARTICLE_SAVE_AS = BLOG_SLUG + '/{category}/{slug}/index.html'
ARTICLE_LANG_SAVE_AS = BLOG_SLUG + '/{category}/{slug}-{lang}/index.html'
CATEGORIES_SAVE_AS = BLOG_SLUG + '/categories/index.html'
CATEGORY_SAVE_AS = BLOG_SLUG + '/{slug}/index.html'
TAGS_SAVE_AS = BLOG_SLUG + '/etiquettes/index.html'
TAG_SAVE_AS = BLOG_SLUG + '/etiquettes/{slug}/index.html'
AUTHORS_SAVE_AS = BLOG_SLUG + '/auteurs/index.html'
AUTHOR_SAVE_AS = BLOG_SLUG + '/auteurs/{slug}/index.html'
REDIRECT_SAVE_AS = PAGE_SAVE_AS # Handled by a plugin
PAGE_URL = '{slug}/'
PAGE_LANG_URL = '{slug}-{lang}/'
ARTICLE_URL = 'blog/{category}/{slug}/'
ARTICLE_LANG_URL = 'blog/{category}/{slug}-{lang}/'
CATEGORIES_URL = INDEX_SLUG + '/categories/'
CATEGORY_URL = INDEX_SLUG + '/{slug}'
TAGS_URL = INDEX_SLUG + '/etiquettes/'
TAG_URL = INDEX_SLUG + '/etiquettes/{slug}/'
AUTHORS_URL = INDEX_SLUG + '/auteurs/'
AUTHOR_URL = INDEX_SLUG + '/auteur/{slug}/'
ARTICLE_URL = BLOG_SLUG + '/{category}/{slug}/'
ARTICLE_LANG_URL = BLOG_SLUG + '/{category}/{slug}-{lang}/'
CATEGORIES_URL = BLOG_SLUG + '/categories/'
CATEGORY_URL = BLOG_SLUG + '/{slug}'
TAGS_URL = BLOG_SLUG + '/etiquettes/'
TAG_URL = BLOG_SLUG + '/etiquettes/{slug}/'
AUTHORS_URL = BLOG_SLUG + '/auteurs/'
AUTHOR_URL = BLOG_SLUG + '/auteur/{slug}/'
else : # For maximum compatibility (e.g. Apache servers without mod_rewrite)
PAGE_SAVE_AS = '{slug}.html'
PAGE_LANG_SAVE_AS = '{slug}-{lang}.html'
ARTICLE_SAVE_AS = INDEX_SLUG + '/{category}/{slug}.html'
ARTICLE_LANG_SAVE_AS = INDEX_SLUG + '/{category}/{slug}-{lang}.html'
INDEX_SAVE_AS = INDEX_SLUG + '.html' # Defines to what path we want index.html template to be output
CATEGORIES_SAVE_AS = INDEX_SLUG + '/categories.html'
CATEGORY_SAVE_AS = INDEX_SLUG + '/{slug}.html'
TAGS_SAVE_AS = INDEX_SLUG + '/etiquettes.html'
TAG_SAVE_AS = INDEX_SLUG + '/etiquettes/{slug}.html'
AUTHORS_SAVE_AS = INDEX_SLUG + '/auteurs.html'
AUTHOR_SAVE_AS = INDEX_SLUG + '/auteurs/{slug}.html'
INDEX_SAVE_AS = BLOG_SLUG + '.html'
ARTICLE_SAVE_AS = BLOG_SLUG + '/{category}/{slug}.html'
ARTICLE_LANG_SAVE_AS = BLOG_SLUG + '/{category}/{slug}-{lang}.html'
CATEGORIES_SAVE_AS = BLOG_SLUG + '/categories.html'
CATEGORY_SAVE_AS = BLOG_SLUG + '/{slug}.html'
TAGS_SAVE_AS = BLOG_SLUG + '/etiquettes.html'
TAG_SAVE_AS = BLOG_SLUG + '/etiquettes/{slug}.html'
AUTHORS_SAVE_AS = BLOG_SLUG + '/auteurs.html'
AUTHOR_SAVE_AS = BLOG_SLUG + '/auteurs/{slug}.html'
REDIRECT_SAVE_AS = PAGE_SAVE_AS # Handled by a plugin
PAGE_URL = '{slug}.html'
PAGE_LANG_URL = '{slug}-{lang}.html'
ARTICLE_URL = 'blog/{category}/{slug}.html'
ARTICLE_LANG_URL = 'blog/{category}/{slug}-{lang}.html'
CATEGORIES_URL = INDEX_SLUG + '/categories.html'
CATEGORY_URL = INDEX_SLUG + '/{slug}.html'
TAGS_URL = INDEX_SLUG + '/etiquettes.html'
TAG_URL = INDEX_SLUG + '/etiquettes/{slug}.html'
AUTHORS_URL = INDEX_SLUG + '/auteurs.html'
AUTHOR_URL = INDEX_SLUG + '/auteurs/{slug}.html'
ARTICLE_URL = BLOG_SLUG + '/{category}/{slug}.html'
ARTICLE_LANG_URL = BLOG_SLUG + '/{category}/{slug}-{lang}.html'
CATEGORIES_URL = BLOG_SLUG + '/categories.html'
CATEGORY_URL = BLOG_SLUG + '/{slug}.html'
TAGS_URL = BLOG_SLUG + '/etiquettes.html'
TAG_URL = BLOG_SLUG + '/etiquettes/{slug}.html'
AUTHORS_URL = BLOG_SLUG + '/auteurs.html'
AUTHOR_URL = BLOG_SLUG + '/auteurs/{slug}.html'
INDEX_URL = PAGE_URL.replace('{slug}', INDEX_SLUG)
BLOG_URL = PAGE_URL.replace('{slug}', BLOG_SLUG)
IMPROVE_SITE_URL = PAGE_URL.replace('{slug}', IMPROVE_SITE_SLUG)
......@@ -154,7 +156,7 @@ PRIMARY_NAV = [
('<span class="optional">La </span>Toile de Confiance', 'toile-de-confiance'),
('Contribuer', 'contribuer'),
('Forger<span class="optional"> des blocs</span>', 'miner-des-blocs'),
('Actualités', INDEX_SLUG),
('Actualités', BLOG_SLUG),
]
SECONDARY_NAV = [
......@@ -208,8 +210,6 @@ ASSET_SOURCE_PATHS = [
"../" + CHILD_THEME_NAME + '/static' + '/less'
]
DIRECT_TEMPLATES = ['index', 'categories', 'authors', 'archives', 'search', 'tags']
MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': { 'css_class': 'highlight' },
......
......@@ -2,6 +2,8 @@ Title: Blockchain + dividende universel
Breadcrumb: Accueil
BodyId: home
BodyClass: pages-principales
URL:
save_as: index.html
<header id="showcase">
<div>
......
......@@ -69,7 +69,7 @@
</a>
</li>
<li><a href="{{ SITEURL}}/{{ INDEX_URL }}">{{ _('Actualités') }}</a></li>
<li><a href="{{ SITEURL}}/{{ BLOG_URL }}">{{ _('Actualités') }}</a></li>
{% if DISPLAY_CATEGORY_IN_BREADCRUMBS %}
<li><a href="{{ SITEURL }}/{{ article.category.url }}" title="{{ article.category }}">{{ article.category }}</a></li>
......
......@@ -12,7 +12,7 @@
</a>
</li>
<li>
<a href="{{ SITEURL}}/{{ INDEX_URL }}">
<a href="{{ SITEURL}}/{{ BLOG_URL }}">
{{ _('Actualités') }}
</a>
</li>
......
......@@ -12,7 +12,7 @@
</a>
</li>
<li>
<a href="{{ SITEURL}}/{{ INDEX_URL }}">
<a href="{{ SITEURL}}/{{ BLOG_URL }}">
{{ _('Actualités') }}
</a>
</li>
......
......@@ -140,7 +140,7 @@
<nav id="primaryMenu">
{% if page %}
{% if page.slug == 'index' %}
{% if page.template == 'index' %}
{% set siteTitleElt = 'h1' %}
{% else %}
{% set siteTitleElt = 'h2' %}
......@@ -181,11 +181,11 @@
{# Lets check if this menu item matches visitor URL #}
{% if slug == INDEX_SLUG %}
{% if slug == BLOG_SLUG %}
{% set ns.menuItemURL = INDEX_URL %}
{% set ns.menuItemURL = BLOG_URL %}
{% if (article or category or tag or author) or (output_file == INDEX_URL) or (output_file == CATEGORIES_URL) or (output_file == TAGS_URL) or (output_file == AUTHORS_URL) %}
{% if (article or category or tag or author) or (output_file == BLOG_URL) or (output_file == CATEGORIES_URL) or (output_file == TAGS_URL) or (output_file == AUTHORS_URL) %}
{% set ns.active = ' class="active"' %}
......
......@@ -10,7 +10,7 @@
{{ SITENAME }}
</a>
</li>
<li><a href="{{ SITEURL}}/{{ INDEX_URL }}">{{ _('Actualités') }}</a></li>
<li><a href="{{ SITEURL}}/{{ BLOG_URL }}">{{ _('Actualités') }}</a></li>
<li class="active">{{ _('Catégories') }}</li>
</ol>
</nav>
......
......@@ -13,7 +13,7 @@
{{ SITENAME }}
</a>
</li>
<li><a href="{{ SITEURL}}/{{ INDEX_URL }}">{{ _('Actualités') }}</a></li>
<li><a href="{{ SITEURL}}/{{ BLOG_URL }}">{{ _('Actualités') }}</a></li>
<li class="active">{{ category }}</li>
</ol>
</nav>
......
{% extends "base.html" %}
{% block title -%}
{% if (page.slug == 'index') %}
{% if (page.template == 'index') %}
{{ page.title }} - {{ SITENAME }}
{% else %}
{{ page.title }} - {{ SITENAME }}
......@@ -73,7 +73,7 @@
{% if page.url %}
{% if (page.slug != 'index') %}
{% if (page.template != 'index') %}
<li class="active">
{% if (page.breadcrumb) %}
{{ page.breadcrumb }}
......
......@@ -13,7 +13,7 @@
{{ SITENAME }}
</a>
</li>
<li><a href="{{ SITEURL}}/{{ INDEX_URL }}">{{ _('Actualités') }}</a></li>
<li><a href="{{ SITEURL}}/{{ BLOG_URL }}">{{ _('Actualités') }}</a></li>
<li><a href="{{ SITEURL }}/{{ TAGS_URL }}">Étiquettes</a></li>
<li class="active">{{ tag }}</li>
</ol>
......
......@@ -12,7 +12,7 @@
</a>
</li>
<li>
<a href="{{ SITEURL}}/{{ INDEX_URL }}">
<a href="{{ SITEURL}}/{{ BLOG_URL }}">
{{ _('Actualités') }}
</a>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment