feat: applied mega-linter locally

This commit is contained in:
Laureηt 2021-10-18 22:58:07 +02:00
parent 317d564318
commit 0cafbb84bc
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
12 changed files with 56 additions and 60 deletions

View file

@ -1,55 +1,53 @@
const pluginNavigation = require("@11ty/eleventy-navigation")
const htmlmin = require("html-minifier");
const markdownIt = require("markdown-it");
const markdownItAttrs = require('markdown-it-attrs');
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);
}
const markdownLib = markdownIt(options).use(markdownItAttrs)
module.exports = function (eleventyConfig) {
eleventyConfig.addGlobalData("username", "Laureηt");
eleventyConfig.addPlugin(pluginNavigation);
eleventyConfig.setLibrary("md", markdownLib);
eleventyConfig.addWatchTarget("./src/scss/");
eleventyConfig.addGlobalData('username', 'Laureηt')
eleventyConfig.addPlugin(pluginNavigation)
eleventyConfig.setLibrary('md', markdownLib)
eleventyConfig.addWatchTarget('./src/scss/')
eleventyConfig.addPassthroughCopy({
"assets/": "./",
});
'assets/': './'
})
if (process.env.ELEVENTY_ENV == 'prod') {
eleventyConfig.addTransform("htmlmin", function (content, outputPath) {
if (process.env.ELEVENTY_ENV === 'prod') {
eleventyConfig.addTransform('htmlmin', function (content, outputPath) {
// Eleventy 1.0+: use this.inputPath and this.outputPath instead
if (outputPath && outputPath.endsWith(".html")) {
let minified = htmlmin.minify(content, {
if (outputPath && outputPath.endsWith('.html')) {
const minified = htmlmin.minify(content, {
useShortDoctype: true,
removeComments: true,
collapseWhitespace: true,
minifyJS: true,
minifyCSS: true,
});
return minified;
minifyCSS: true
})
return minified
} else {
return content;
return content
}
});
})
}
eleventyConfig.addShortcode("year", () => {
let year = new Date().getFullYear();
return year.toString();
});
eleventyConfig.addShortcode('year', () => {
const year = new Date().getFullYear()
return year.toString()
})
return {
passthroughFileCopy: true,
dir: {
input: "src",
data: "_data",
output: "_site",
includes: "_includes",
},
input: 'src',
data: '_data',
output: '_site',
includes: '_includes'
}
}
}

1
.gitignore vendored
View file

@ -2,6 +2,7 @@ node_modules/
_site/
content/
report/
src/_includes/css
*.log

2
.vscode/launch.json vendored
View file

@ -10,7 +10,7 @@
"runtimeArgs": [
"run",
"start"
],
]
}
]
}

View file

@ -1,9 +1,9 @@
{
"editor.formatOnSave": true,
"[nunjucks]": {
"editor.defaultFormatter": "okitavera.vscode-nunjucks-formatter",
"editor.defaultFormatter": "okitavera.vscode-nunjucks-formatter"
},
"emmet.includeLanguages": {
"nunjucks": "html",
"nunjucks": "html"
}
}

View file

@ -55,7 +55,7 @@ yarn run build
This repository is under the [Contributing Covenant](https://www.contributor-covenant.org/) code of conduct.
See [`CONTRIBUTING.md`](https://git.inpt.fr/fainsil/personnal-website/-/blob/master/CONTRIBUTING.md) for more information.\
Please use [conventionnal commits](https://www.conventionalcommits.org/).
Please use [conventional commits](https://www.conventionalcommits.org/).
## License

View file

@ -235,7 +235,7 @@
},
{
"name": "Fishkeeping",
"summary": "Tamagochis, but with real responsabilities.",
"summary": "Tamagochis, but with real responsibilities.",
"tags": [
"Patience",
"Perfectionism"

View file

@ -10,12 +10,12 @@ This is the civic engagement that I am currently pursuing during my studies at E
---
## Flyer :
## Flyer
<img src="{{ '/content/2021-01-16-flyer.png' | url }}" width="100%">
---
## Video presentation :
## Video presentation
<video src="{{ '/content/2021-01-16-video.mp4' | url }}" width="1080" height="720" controls></video>

View file

@ -10,12 +10,12 @@ Here are small videos I had to make to present myself.
---
## English Version :
## English Version
<video src="{{ '/content/2020-11-06-v1.mp4' | url }}" width="1080" height="720" controls></video>
---
## Japanese Version :
## Japanese Version
<video src="{{ '/content/2020-12-19-v1.mp4' | url }}" width="1080" height="720" controls></video>

View file

@ -15,29 +15,29 @@
@keyframes blink {
0% {
opacity: 1.0;
opacity: 1;
}
50% {
opacity: 0.0;
opacity: 0;
}
100% {
opacity: 1.0;
opacity: 1;
}
}
@-webkit-keyframes blink {
0% {
opacity: 1.0;
opacity: 1;
}
50% {
opacity: 0.0;
opacity: 0;
}
100% {
opacity: 1.0;
opacity: 1;
}
}

View file

@ -25,5 +25,5 @@ h2 {
margin-top: 2rem;
display: flex;
justify-content: center;
gap: .2rem;
gap: 0.2rem;
}

View file

@ -43,7 +43,7 @@ section>ul {
}
li.event {
padding: .8em 0 .8em 2.3em;
padding: 0.8em 0 0.8em 2.3em;
margin-left: 1.25em;
border-left: 2px #c0c5ce solid;
}
@ -52,17 +52,17 @@ li.event {
display: inline;
border-bottom: 2px #942994 solid;
border-radius: 0.2em;
margin-right: .3em;
margin-right: 0.3em;
font-size: 17px;
}
small {
font-size: .7em;
font-size: 0.7em;
vertical-align: middle;
}
h1>small {
font-size: .45em;
font-size: 0.45em;
}
section {
@ -77,7 +77,7 @@ section>p {
}
section>h3 {
margin-bottom: .3em;
margin-bottom: 0.3em;
}
.project-links {
@ -85,12 +85,12 @@ section>h3 {
}
.project-links>a {
padding-left: .3em;
padding-left: 0.3em;
text-decoration: none;
}
h2 {
margin: 1em 0 .3em 0;
margin: 1em 0 0.3em 0;
}
.arrow-up {

View file

@ -12,17 +12,14 @@ $h1-size: 3rem;
body {
background-color: $background;
color: $foreground-text;
font-family: 'Lora', serif;
text-rendering: optimizeLegibility;
font-size: $font-size;
width: 60rem;
padding: 0 2rem;
margin: auto;
animation: intro .3s both;
animation-delay: .15s;
animation: intro 0.3s both;
animation-delay: 0.15s;
}
a {