Skip to content

Commit

Permalink
Provisional alert include: Simplify link destination
Browse files Browse the repository at this point in the history
* Use the relative_url Liquid filter for the provisional page's link destination (makes it relative to baseurl)
* Remove the provisionaldir and siteroot variables
* Fixes broken links caused by incorrect relative paths
* Spinoff of wet-boew#2179
  • Loading branch information
EricDunsworth authored and duboisp committed Aug 22, 2023
1 parent 59416d0 commit bcd9344
Show file tree
Hide file tree
Showing 35 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions _includes/alert-provisional.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<h2>Fonctionnalité instable</h2>
<p>À être utilisé <strong>à vos propres risques</strong>. Toutes les fonctionnalités décrites ci-dessous pourraient être retirées à n'importe quelle version mineur/majeur ultérieure et l'ensemble des fonctionnalités provisoires sont exclues de l'API publique de GCWeb.</p>
<p>La documentation et/ou les exemples pratiques pourraient être incomplets ou être non disponible.</p>
<p><a href="{{ include.provisionaldir }}provisional-fr.html">Voir l'ensemble des fonctionnalités provisoires.</a></p>
<p><a href="{{ "components/provisional-fr.html" | relative_url }}">Voir l'ensemble des fonctionnalités provisoires.</a></p>
</div>
{%- elsif page.language == "en" -%}
<div class="alert alert-warning">
<h2>Unstable feature</h2>
<p>To be used at <strong>your own risks</strong>. All functionalities described below could be removed in any subsequent minor/major release and are excluded from the GCWeb public API.</p>
<p>Documentation and/or working examples for those features could be incomplete or not available.</p>
<p><a href="{{ include.provisionaldir }}provisional-en.html">See all provisional features.</a></p>
<p><a href="{{ "components/provisional-en.html" | relative_url }}">See all provisional features.</a></p>
</div>
{%- endif -%}
2 changes: 1 addition & 1 deletion components/gc-featured-link/gc-featured-link-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="container">
<h1>{{ page.title }}</h1>

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-featured-link/gc-featured-link-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="container">
<h1>{{ page.title }}</h1>

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-feeds/gc-feeds-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "gc-feeds-fr.html"
title: "Feeds plugin GC override - Provisional feature"
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-feeds/gc-feeds-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "gc-feeds-en.html"
title: "Fils de syndication remplacement et application de styles GC - fonctionnalité provisoire"
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-most-requested/gc-most-requested-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "gc-most-requested-fr.html"
title: "Most requested - Provisional feature"
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-most-requested/gc-most-requested-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "gc-most-requested-en.html"
title: "En demande - fonctionnalité provisoire"
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<span class="wb-prettify all-pre hide"></span>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/aem-bad-implementation-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Deprecated implementation</h2>
<p>This implementation of the GC-Subway plugin is deprecated and will be removed shortly.</p>
</div>

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/aem-bad-implementation-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Implémentation dépréciée</h2>
<p>Cette implémentation du plugiciel GC-Subway est obsolète et sera bientôt supprimée.</p>
</div>

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/docs-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"share": "true"
}
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<div class="wb-prettify all-pre hide"></div>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/docs-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"share": "true"
}
---
{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<div class="wb-prettify all-pre hide"></div>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/index-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<h1 property="name" id="wb-cont" class="gc-thickline">GC Subway index</h1>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/index-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

<h1 property="name" id="wb-cont" class="gc-thickline">Page d'introduction de GC Métro</h1>

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section-rel-info-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section-rel-info-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section-subtitle-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section-subtitle-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section1-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section1-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section2-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/section2-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/sub-section-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/sub-section-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/sub-section-noline-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-subway/sub-section-noline-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
---

{% include alert-provisional.html siteroot="../../" %}
{% include alert-provisional.html %}

{%- include_relative fragments/docs-questions.html -%}

Expand Down
2 changes: 1 addition & 1 deletion components/gc-table/gc-table-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"title": "GC tables"
}
---
{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}
<span class="wb-prettify all-pre hide"></span>

<dl class="horizontal">
Expand Down
2 changes: 1 addition & 1 deletion components/gc-table/gc-table-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"title": "Tableaux GC"
}
---
{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}
<span class="wb-prettify all-pre hide"></span>

<dl class="horizontal">
Expand Down
2 changes: 1 addition & 1 deletion components/wb-chtwzrd/chatwizard-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
dateModified: "2022-08-25"
---

{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}

<ul class="list-inline">
<li><a class="btn btn-primary" href="docs.html">Documentation</a></li>
Expand Down
2 changes: 1 addition & 1 deletion components/wb-chtwzrd/chatwizard-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "chatwizard-en.html"
dateModified: "2022-08-25"
---
{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}

<div class="wb-prettify all-pre"></div>

Expand Down
2 changes: 1 addition & 1 deletion components/wb-chtwzrd/chatwizard-json-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "chatwizard-json-fr.html"
dateModified: "2022-08-25"
---
{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}

<ul class="list-inline">
<li><a class="btn btn-primary" href="docs.html">Documentation</a></li>
Expand Down
2 changes: 1 addition & 1 deletion components/wb-chtwzrd/chatwizard-json-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
altLangPage: "chatwizard-json-en.html"
dateModified: "2022-08-25"
---
{% include alert-provisional.html provisionaldir="../" %}
{% include alert-provisional.html %}

<div class="wb-prettify all-pre"></div>

Expand Down
2 changes: 1 addition & 1 deletion templates/thematic/dark-theme-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"share": "true"
}
---
{% include alert-provisional.html provisionaldir="../../components/" %}
{% include alert-provisional.html %}
{% include web-contents/placeholdercontent-en.html %}
2 changes: 1 addition & 1 deletion templates/thematic/dark-theme-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"share": "true"
}
---
{% include alert-provisional.html provisionaldir="../../components/" %}
{% include alert-provisional.html %}
{% include web-contents/placeholdercontent-fr.html %}
2 changes: 1 addition & 1 deletion templates/thematic/pink-day-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"share": "true"
}
---
{% include alert-provisional.html provisionaldir="../../components/" %}
{% include alert-provisional.html %}
{% include web-contents/placeholdercontent-en.html %}

<h2>Home page banner sample</h2>
Expand Down
2 changes: 1 addition & 1 deletion templates/thematic/pink-day-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"share": "true"
}
---
{% include alert-provisional.html provisionaldir="../../components/" %}
{% include alert-provisional.html %}
{% include web-contents/placeholdercontent-fr.html %}

<h2>Example de la page d'accueil</h2>
Expand Down

0 comments on commit bcd9344

Please sign in to comment.