feat: converted index.njk to index.md

This commit is contained in:
Laureηt 2021-10-07 22:45:46 +02:00
parent 7392694b4f
commit b7bee1c9e0
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
5 changed files with 79 additions and 44 deletions

View file

@ -1,12 +1,20 @@
const pluginNavigation = require("@11ty/eleventy-navigation") const pluginNavigation = require("@11ty/eleventy-navigation")
const htmlmin = require("html-minifier"); const htmlmin = require("html-minifier");
const markdownIt = require("markdown-it");
const markdownItAttrs = require('markdown-it-attrs');
const options = {
html: true,
breaks: true,
linkify: true
};
const markdownLib = markdownIt(options).use(markdownItAttrs);
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginNavigation); eleventyConfig.addPlugin(pluginNavigation);
eleventyConfig.setLibrary("md", markdownLib);
eleventyConfig.addWatchTarget("./src/scss/"); eleventyConfig.addWatchTarget("./src/scss/");
eleventyConfig.addPassthroughCopy({ eleventyConfig.addPassthroughCopy({
"node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js", "node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js",
"assets/": "./", "assets/": "./",
@ -36,12 +44,13 @@ module.exports = function (eleventyConfig) {
}); });
return { return {
passthroughFileCopy: true,
dir: { dir: {
input: "src" input: "src",
data: "_data",
output: "_site",
includes: "_includes",
}, },
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
} }
} }

View file

@ -16,6 +16,8 @@
"@11ty/eleventy-navigation": "^0.2.0", "@11ty/eleventy-navigation": "^0.2.0",
"chaffle": "^2.1.0", "chaffle": "^2.1.0",
"html-minifier": "^4.0.0", "html-minifier": "^4.0.0",
"markdown-it": "^12.2.0",
"markdown-it-attrs": "^4.1.0",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"sass": "^1.42.1" "sass": "^1.42.1"
} }

29
src/index.md Executable file
View file

@ -0,0 +1,29 @@
---
layout: layout.njk
---
# whoami {data-chaffle="en"}
Hi, my name's Laurent Fainsin, and I'm currently an M1 engineering student at [ENSEEIHT](https://www.enseeiht.fr/) in France.
I study Computer Science and this is my personnal website to showcase my work.
Here is my [resume]({{ '/resume/en' | url }}) if you are professionally interested.
---
# ls projects {data-chaffle="en"}
Nothing worth showing for now. Come back later.
---
# cat contacts {data-chaffle="en"}
You can email me at :
- [laurentfainsin@protonmail.com](mailto:laurentfainsin@protonmail.com)
- [laurent.fainsin@etu.inp-n7.fr](mailto:laurent.fainsin@etu.inp-n7.fr)
You can reach me via :
- [Matrix.to](https://matrix.to/#/@fainsil:inpt.fr)
- [LinkedIn](https://www.linkedin.com/in/laurent-fainsin/)

View file

@ -1,38 +0,0 @@
---
layout: layout.njk
---
<h1 data-chaffle="en">whoami</h1>
<p>Hi, my name's Laurent Fainsin, and I'm currently an M1 engineering student at <a href="https://www.enseeiht.fr/">ENSEEIHT</a> in France. I study Computer Science and this is my personnal website to showcase my work. Here is my <a href="{{ '/resume/en' | url }}">resume</a> if you are professionally interested.</p>
<hr>
<h1 data-chaffle="en">ls -l Projects</h1>
<p>Nothing worth showing for now. Come back later.</p>
<hr>
<h1 data-chaffle="en">./contact</h1>
<p>You can email me at :</p>
<ul>
<li>
<a href="mailto:laurentfainsin@protonmail.com">
laurentfainsin@protonmail.com
</a>
</li>
<li>
<a href="mailto:laurent.fainsin@etu.inp-n7.fr">
laurent.fainsin@etu.inp-n7.fr
</a>
</li>
</ul>
<p>You can reach me via :</p>
<ul>
<li>
<a href="https://matrix.to/#/@fainsil:inpt.fr">Matrix.to</a>
</li>
<li>
<a href="https://www.linkedin.com/in/laurent-fainsin/">LinkedIn</a>
</li>
</ul>

View file

@ -173,6 +173,11 @@ argparse@^1.0.7:
dependencies: dependencies:
sprintf-js "~1.0.2" sprintf-js "~1.0.2"
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
array-differ@^1.0.0: array-differ@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
@ -794,6 +799,11 @@ entities@~2.0.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
entities@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
errno@^0.1.2: errno@^0.1.2:
version "0.1.8" version "0.1.8"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
@ -1518,6 +1528,13 @@ linkify-it@^2.0.0:
dependencies: dependencies:
uc.micro "^1.0.1" uc.micro "^1.0.1"
linkify-it@^3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e"
integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==
dependencies:
uc.micro "^1.0.1"
liquidjs@^6.4.3: liquidjs@^6.4.3:
version "6.4.3" version "6.4.3"
resolved "https://registry.yarnpkg.com/liquidjs/-/liquidjs-6.4.3.tgz#c7caf7a3f6c87dc6a22a5a351328cf8f7298c243" resolved "https://registry.yarnpkg.com/liquidjs/-/liquidjs-6.4.3.tgz#c7caf7a3f6c87dc6a22a5a351328cf8f7298c243"
@ -1590,6 +1607,11 @@ map-cache@^0.2.0:
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
markdown-it-attrs@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/markdown-it-attrs/-/markdown-it-attrs-4.1.0.tgz#e27f023cd8731b15b4a5e971d51e6f45b3b947bc"
integrity sha512-xd1SuNQPArGYl3SN1bsOHRnmMenkqeLDbTR0udeyGMSFBnaOtxP4yz1SEKrjsV/XYFygFAeKFHgbbj6AwxbTfA==
markdown-it@^10.0.0: markdown-it@^10.0.0:
version "10.0.0" version "10.0.0"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc"
@ -1601,6 +1623,17 @@ markdown-it@^10.0.0:
mdurl "^1.0.1" mdurl "^1.0.1"
uc.micro "^1.0.5" uc.micro "^1.0.5"
markdown-it@^12.2.0:
version "12.2.0"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.2.0.tgz#091f720fd5db206f80de7a8d1f1a7035fd0d38db"
integrity sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==
dependencies:
argparse "^2.0.1"
entities "~2.1.0"
linkify-it "^3.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.5"
maximatch@^0.1.0: maximatch@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/maximatch/-/maximatch-0.1.0.tgz#86cd8d6b04c9f307c05a6b9419906d0360fb13a2" resolved "https://registry.yarnpkg.com/maximatch/-/maximatch-0.1.0.tgz#86cd8d6b04c9f307c05a6b9419906d0360fb13a2"