From b7bee1c9e0a60fd5586fe0a4203ddd18b3ab4921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Thu, 7 Oct 2021 22:45:46 +0200 Subject: [PATCH] feat: converted index.njk to index.md --- .eleventy.js | 21 +++++++++++++++------ package.json | 2 ++ src/index.md | 29 +++++++++++++++++++++++++++++ src/index.njk | 38 -------------------------------------- yarn.lock | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 44 deletions(-) create mode 100755 src/index.md delete mode 100755 src/index.njk diff --git a/.eleventy.js b/.eleventy.js index 342b558..2d00fd8 100755 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,12 +1,20 @@ const pluginNavigation = require("@11ty/eleventy-navigation") 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) { eleventyConfig.addPlugin(pluginNavigation); - + eleventyConfig.setLibrary("md", markdownLib); eleventyConfig.addWatchTarget("./src/scss/"); - eleventyConfig.addPassthroughCopy({ "node_modules/chaffle/docs/chaffle.min.js": "javascript/chaffle.min.js", "assets/": "./", @@ -36,12 +44,13 @@ module.exports = function (eleventyConfig) { }); return { + passthroughFileCopy: true, dir: { - input: "src" + input: "src", + data: "_data", + output: "_site", + includes: "_includes", }, - dataTemplateEngine: 'njk', - htmlTemplateEngine: 'njk', - markdownTemplateEngine: 'njk', } } diff --git a/package.json b/package.json index feb00b3..da74b74 100755 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "@11ty/eleventy-navigation": "^0.2.0", "chaffle": "^2.1.0", "html-minifier": "^4.0.0", + "markdown-it": "^12.2.0", + "markdown-it-attrs": "^4.1.0", "npm-run-all": "^4.1.5", "sass": "^1.42.1" } diff --git a/src/index.md b/src/index.md new file mode 100755 index 0000000..b63ebbd --- /dev/null +++ b/src/index.md @@ -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/) diff --git a/src/index.njk b/src/index.njk deleted file mode 100755 index a3baf2a..0000000 --- a/src/index.njk +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: layout.njk ---- - -

whoami

-

Hi, my name's Laurent Fainsin, and I'm currently an M1 engineering student at ENSEEIHT in France. I study Computer Science and this is my personnal website to showcase my work. Here is my resume if you are professionally interested.

- -
- -

ls -l Projects

- -

Nothing worth showing for now. Come back later.

- -
- -

./contact

-

You can email me at :

- -

You can reach me via :

- diff --git a/yarn.lock b/yarn.lock index e01847a..455a090 100644 --- a/yarn.lock +++ b/yarn.lock @@ -173,6 +173,11 @@ argparse@^1.0.7: dependencies: 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: version "1.0.0" 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" 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: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" @@ -1518,6 +1528,13 @@ linkify-it@^2.0.0: dependencies: 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: version "6.4.3" 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" 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: version "10.0.0" 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" 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: version "0.1.0" resolved "https://registry.yarnpkg.com/maximatch/-/maximatch-0.1.0.tgz#86cd8d6b04c9f307c05a6b9419906d0360fb13a2"