Skip to content

Commit

Permalink
Fetch documentation and add it as a new page
Browse files Browse the repository at this point in the history
  • Loading branch information
hjonin committed Sep 19, 2023
1 parent b041657 commit 03b932f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.cache/
_site/
node_modules/
11 changes: 11 additions & 0 deletions _data/documentation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const EleventyFetch = require("@11ty/eleventy-fetch");

module.exports = async function() {
let url = "https://code.gouv.fr/documentation/index.md";

/* This returns a promise */
return await EleventyFetch(url, {
duration: "*",
type: "text"
});
};
5 changes: 5 additions & 0 deletions content/fr/documentation/service-public-logiciels-libres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Toute la documentation
layout: layouts/page.njk
---
{{ documentation | safe }}
30 changes: 25 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@
"homepage": "https://code.gouv.fr/",
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-fetch": "^4.0.0",
"@11ty/eleventy-img": "^3.1.0",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.4",
"@11ty/eleventy-plugin-rss": "^1.2.0",
"@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 03b932f

Please sign in to comment.