Skip to content

Commit

Permalink
add mermaid, add api.gouv.fr
Browse files Browse the repository at this point in the history
  • Loading branch information
mogador26 committed Nov 28, 2023
1 parent 72431bd commit dfa7105
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 10 deletions.
8 changes: 6 additions & 2 deletions _includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@
{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}

<style>{% getBundle "css" %}</style>

<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
</script>
<script>mermaid.initialize({ startOnLoad: true });</script>
<meta name="generator" content="{{ eleventy.generator }}">

<title>{{ title or metadata.title }}</title>

</head>
<body id="top">
{% include "templates/header.njk" %}
Expand Down
2 changes: 2 additions & 0 deletions _includes/templates/footer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
</li>
<li class="fr-footer__content-item">
<a class="fr-footer__content-link" target="_blank" href="https://data.gouv.fr">data.gouv.fr</a></li>
<li class="fr-footer__content-item">
<a class="fr-footer__content-link" target="_blank" href="https://api.gouv.fr">api.gouv.fr</a></li>
</ul>
</div>
</div>
Expand Down
23 changes: 20 additions & 3 deletions content/fr/guide-architecture/sommaire.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
---
title: Guide d'architecture
title: Architecture
layout: layouts/page.njk
showBreadcrumb: true
eleventyNavigation:
key: guide d'architecture
key: architecture
parent: Socle
order: 2
---

Voici une solution d'architecture applicative dans un environnement Kubernetes et décrite avec mermaid

<pre class="mermaid">
graph LR;
client([client])-. Ingress-managed <br> load balancer .->ingress[Ingress];
ingress-->|routing rule|service[Service];
subgraph cluster
ingress;
service-->pod1[Pod];
service-->pod2[Pod];
end
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
class ingress,service,pod1,pod2 k8s;
class client plain;
class cluster cluster;
</pre>

{% include "components/back_to_top.njk" %}
{% include "components/back_to_top.njk" %}
4 changes: 2 additions & 2 deletions content/fr/guide-securite/sommaire.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Guide de la sécurité
title: Sécurité
layout: layouts/page.njk
showBreadcrumb: true
eleventyNavigation:
key: guide de la sécurité
key: sécurité
parent: Socle
order: 3
---
Expand Down
2 changes: 1 addition & 1 deletion content/fr/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ eleventyNavigation:
<div class="fr-container fr-pt-8w fr-pb-6w fr-mb-6w">
<div class="fr-grid-row">
<div class="fr-col-offset-md-1 fr-col-12 fr-col-sm-12 fr-col-md-6">
<h1>Un exemple de site pour le cadre de cohérence technique du ministère de l'intérieur</h1>
<h2>Un cadre de cohérence pour construire <em>"une solution qui peut être un produit, un système ou un service qui fournit de la valeur aux agents et usagers"</em></h2>
<p class="fr-text--lead">
<a href="./chapeau" target="_blank"><strong>Venez marcher dans ses pas &#128406;&#127997;</strong></a>
</p>
Expand Down
9 changes: 9 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginBundle);
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);

const highlighter = eleventyConfig.markdownHighlighter;
eleventyConfig.addMarkdownHighlighter((str, language) => {
if (language === "mermaid") {
return `<pre class="mermaid">${str}</pre>`;
}
return highlighter(str, language);
});


// Custom collections
eleventyConfig.addCollection("allSortedByPathAsc", function(collectionApi) {
return collectionApi.getAll().sort((a, b) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
"@gouvfr/dsfr": "^1.9.3",
"chalk": "^4.1.2",
"ics": "^3.2.0",
"luxon": "^3.2.1",
"markdown-it-anchor": "^8.6.6",
"markdown-it-attrs": "^4.1.6",
"markdown-it-container": "^3.0.0",
"pagefind": "^1.0.2",
"ics": "^3.2.0"
"pagefind": "^1.0.2"
}
}

0 comments on commit dfa7105

Please sign in to comment.