1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
b25451e631 chore(release): 2.5.5 [skip ci] 2023-01-10 23:05:24 +00:00
042a861f58 fix: update dependencies to latest 2023-01-10 23:56:46 +01:00
d76db36dbc chore(release): 2.5.4 [skip ci] 2022-12-08 08:54:03 +00:00
99d9dcf334 fix: improve Resume 2022-12-08 09:52:39 +01:00
18 changed files with 2213 additions and 19068 deletions

View File

@ -1,12 +1,5 @@
.vscode .*
.git !.npmrc
.env
build build
.next
coverage coverage
node_modules node_modules
tmp
temp
.DS_Store
.lighthouseci
.vercel

View File

@ -10,7 +10,6 @@
}, },
"rules": { "rules": {
"prettier/prettier": "error", "prettier/prettier": "error",
"unicorn/prefer-node-protocol": "error",
"@next/next/no-img-element": "off" "@next/next/no-img-element": "off"
} }
} }

View File

@ -16,7 +16,7 @@ jobs:
language: ['javascript'] language: ['javascript']
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Initialize CodeQL' - name: 'Initialize CodeQL'
uses: 'github/codeql-action/init@v2' uses: 'github/codeql-action/init@v2'

View File

@ -10,10 +10,10 @@ jobs:
build: build:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'

View File

@ -10,10 +10,10 @@ jobs:
lint: lint:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'
@ -30,8 +30,8 @@ jobs:
- name: 'lint:markdown' - name: 'lint:markdown'
run: 'npm run lint:markdown' run: 'npm run lint:markdown'
- name: 'lint:typescript' - name: 'lint:eslint'
run: 'npm run lint:typescript' run: 'npm run lint:eslint'
- name: 'lint:prettier' - name: 'lint:prettier'
run: 'npm run lint:prettier' run: 'npm run lint:prettier'
@ -40,8 +40,3 @@ jobs:
uses: 'dotenv-linter/action-dotenv-linter@v2' uses: 'dotenv-linter/action-dotenv-linter@v2'
with: with:
github_token: ${{ secrets.github_token }} github_token: ${{ secrets.github_token }}
- name: 'lint:docker'
uses: 'hadolint/hadolint-action@v1.6.0'
with:
dockerfile: './Dockerfile'

View File

@ -8,7 +8,7 @@ jobs:
release: release:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
@ -21,7 +21,7 @@ jobs:
git_commit_gpgsign: true git_commit_gpgsign: true
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'

View File

@ -10,10 +10,10 @@ jobs:
test-unit: test-unit:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'
@ -27,10 +27,10 @@ jobs:
test-lighthouse: test-lighthouse:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'
@ -52,10 +52,10 @@ jobs:
test-e2e: test-e2e:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.1.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.5.1' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: '18.x' node-version: '18.x'
cache: 'npm' cache: 'npm'

View File

@ -1,11 +1,5 @@
{ {
"config": {
"default": true,
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
},
"globs": ["**/*.{md,mdx}"], "globs": ["**/*.{md,mdx}"],
"ignores": ["**/node_modules"] "ignores": ["**/node_modules"],
"customRules": ["markdownlint-rule-relative-links"]
} }

8
.markdownlint.json Normal file
View File

@ -0,0 +1,8 @@
{
"default": true,
"relative-links": true,
"extends": "markdownlint/style/prettier",
"MD024": false,
"MD033": false,
"MD041": false
}

View File

@ -1,21 +1,27 @@
FROM node:18.12.1 AS dependencies FROM node:18.13.0 AS builder-dependencies
WORKDIR /usr/src/app WORKDIR /usr/src/application
COPY ./package*.json ./ COPY ./package*.json ./
RUN npm install RUN npm install
FROM node:18.12.1 AS builder FROM node:18.13.0 AS runner-dependencies
WORKDIR /usr/src/app WORKDIR /usr/src/application
ENV NODE_ENV=production
COPY ./package*.json ./
RUN npm install --omit=dev --ignore-scripts
FROM node:18.13.0 AS builder
WORKDIR /usr/src/application
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
COPY ./ ./ COPY ./ ./
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
RUN npm run build RUN npm run build
FROM node:18.12.1 AS runner FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
WORKDIR /usr/src/app WORKDIR /usr/src/application
ENV NODE_ENV=production ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=builder /usr/src/app/.next/standalone ./ COPY --from=builder /usr/src/application/.next/standalone ./
COPY --from=builder /usr/src/app/.next/static ./.next/static COPY --from=builder /usr/src/application/.next/static ./.next/static
COPY --from=builder /usr/src/app/public ./public COPY --from=builder /usr/src/application/public ./public
COPY --from=builder /usr/src/app/locales ./locales COPY --from=builder /usr/src/application/locales ./locales
COPY --from=builder /usr/src/app/next.config.js ./next.config.js COPY --from=builder /usr/src/application/next.config.js ./next.config.js
CMD ["node", "server.js"] CMD ["./server.js"]

File diff suppressed because it is too large Load Diff

View File

@ -13,9 +13,9 @@
"modern-normalize": "1.1.0" "modern-normalize": "1.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "18.11.9", "@types/node": "18.11.18",
"date-and-time": "2.4.1", "date-and-time": "2.4.1",
"vite": "3.2.4", "vite": "4.0.4",
"vite-plugin-html": "3.2.0" "vite-plugin-html": "3.2.0"
} }
} }

19344
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "divlo", "name": "divlo",
"version": "2.5.3", "version": "2.5.5",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -18,7 +18,7 @@
"lint:commit": "commitlint", "lint:commit": "commitlint",
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",
"lint:markdown": "markdownlint-cli2", "lint:markdown": "markdownlint-cli2",
"lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"", "lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"", "lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
"lint:staged": "lint-staged", "lint:staged": "lint-staged",
"test:unit": "cypress run --component", "test:unit": "cypress run --component",
@ -37,13 +37,13 @@
"@fortawesome/free-brands-svg-icons": "6.2.1", "@fortawesome/free-brands-svg-icons": "6.2.1",
"@fortawesome/free-solid-svg-icons": "6.2.1", "@fortawesome/free-solid-svg-icons": "6.2.1",
"@fortawesome/react-fontawesome": "0.2.0", "@fortawesome/react-fontawesome": "0.2.0",
"@giscus/react": "2.2.4", "@giscus/react": "2.2.6",
"clsx": "1.2.1", "clsx": "1.2.1",
"date-and-time": "2.4.1", "date-and-time": "2.4.1",
"gray-matter": "4.0.3", "gray-matter": "4.0.3",
"html-react-parser": "3.0.4", "html-react-parser": "3.0.7",
"next": "13.0.5", "next": "13.1.1",
"next-mdx-remote": "4.2.0", "next-mdx-remote": "4.2.1",
"next-pwa": "5.6.0", "next-pwa": "5.6.0",
"next-themes": "0.2.1", "next-themes": "0.2.1",
"next-translate": "1.6.0", "next-translate": "1.6.0",
@ -53,46 +53,48 @@
"rehype-raw": "6.1.1", "rehype-raw": "6.1.1",
"rehype-slug": "5.1.0", "rehype-slug": "5.1.0",
"remark-gfm": "3.0.1", "remark-gfm": "3.0.1",
"sharp": "0.31.2", "sharp": "0.31.3",
"shiki": "0.11.1", "shiki": "0.12.1",
"unified": "10.1.2", "unified": "10.1.2",
"unist-util-visit": "4.1.1", "unist-util-visit": "4.1.1",
"universal-cookie": "4.0.4" "universal-cookie": "4.0.4"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "17.3.0", "@commitlint/cli": "17.4.1",
"@commitlint/config-conventional": "17.3.0", "@commitlint/config-conventional": "17.4.0",
"@lhci/cli": "0.10.0", "@lhci/cli": "0.10.0",
"@saithodev/semantic-release-backmerge": "2.1.2", "@saithodev/semantic-release-backmerge": "2.1.2",
"@semantic-release/git": "10.0.1", "@semantic-release/git": "10.0.1",
"@tailwindcss/typography": "0.5.8", "@tailwindcss/typography": "0.5.9",
"@types/node": "18.11.9", "@tsconfig/strictest": "1.0.2",
"@types/react": "18.0.25", "@types/node": "18.11.18",
"@types/react": "18.0.26",
"@types/unist": "2.0.6", "@types/unist": "2.0.6",
"@typescript-eslint/eslint-plugin": "5.45.0", "@typescript-eslint/eslint-plugin": "5.48.1",
"autoprefixer": "10.4.13", "autoprefixer": "10.4.13",
"cypress": "11.2.0", "cypress": "12.3.0",
"editorconfig-checker": "4.0.2", "editorconfig-checker": "4.0.2",
"eslint": "8.28.0", "eslint": "8.31.0",
"eslint-config-conventions": "6.0.0", "eslint-config-conventions": "6.0.0",
"eslint-config-next": "13.0.5", "eslint-config-next": "13.1.1",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.6.0",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.2.1", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1", "eslint-plugin-promise": "6.1.1",
"eslint-plugin-unicorn": "45.0.1", "eslint-plugin-unicorn": "45.0.2",
"html-w3c-validator": "1.2.1", "html-w3c-validator": "1.2.2",
"husky": "8.0.2", "husky": "8.0.3",
"jsonresume-theme-custom": "file:./jsonresume-theme-custom", "jsonresume-theme-custom": "file:./jsonresume-theme-custom",
"lint-staged": "13.0.4", "lint-staged": "13.1.0",
"markdownlint-cli2": "0.5.1", "markdownlint-cli2": "0.6.0",
"postcss": "8.4.19", "markdownlint-rule-relative-links": "1.1.1",
"prettier": "2.8.0", "postcss": "8.4.21",
"prettier-plugin-tailwindcss": "0.2.0", "prettier": "2.8.2",
"prettier-plugin-tailwindcss": "0.2.1",
"semantic-release": "19.0.5", "semantic-release": "19.0.5",
"start-server-and-test": "1.14.0", "start-server-and-test": "1.15.2",
"tailwindcss": "3.2.4", "tailwindcss": "3.2.4",
"typescript": "4.9.3", "typescript": "4.9.4",
"vercel": "28.5.6" "vercel": "28.11.0"
} }
} }

View File

@ -82,7 +82,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
export const getStaticProps: GetStaticProps<BlogPostPageProps> = async ( export const getStaticProps: GetStaticProps<BlogPostPageProps> = async (
context context
) => { ) => {
const slug = context?.params?.slug const slug = context?.params?.['slug']
const { getPostBySlug } = await import('utils/blog') const { getPostBySlug } = await import('utils/blog')
const post = await getPostBySlug(slug) const post = await getPostBySlug(slug)
if (post == null || (post != null && !post.frontmatter.isPublished)) { if (post == null || (post != null && !post.frontmatter.isPublished)) {

View File

@ -19,12 +19,12 @@
{ {
"startDate": "2022", "startDate": "2022",
"endDate": "2023", "endDate": "2023",
"studyType": "Diplôme du Bachelor Universitaire de Technologie (BUT) Informatique", "studyType": "Bachelor Universitaire de Technologie (BUT) Informatique",
"institution": "IUT Robert Schuman à Illkirch-Graffenstaden", "institution": "IUT Robert Schuman à Illkirch-Graffenstaden",
"score": "2ème année", "score": "2ème année",
"courses": [ "courses": [
"Développement Web avec le framework Laravel en PHP", "Développement Web avec le framework Laravel en PHP",
"Patrons et Principes de conceptions (Code maintenable et réutilisable)", "Patrons et Principes de conceptions (Code maintenable et réutilisable) en UML",
"Programmation systèmes en C (Multi-Thread, Serveur/Client UDP/TCP)", "Programmation systèmes en C (Multi-Thread, Serveur/Client UDP/TCP)",
"Sécurisation des accès à la base de données et PL/SQL", "Sécurisation des accès à la base de données et PL/SQL",
"Projet développement d'une application web en React.js en équipe de 3 personnes pendant 3 mois" "Projet développement d'une application web en React.js en équipe de 3 personnes pendant 3 mois"
@ -33,7 +33,7 @@
{ {
"startDate": "2021", "startDate": "2021",
"endDate": "2022", "endDate": "2022",
"studyType": "Diplôme du Bachelor Universitaire de Technologie (BUT) Informatique", "studyType": "Bachelor Universitaire de Technologie (BUT) Informatique",
"institution": "IUT Robert Schuman à Illkirch-Graffenstaden", "institution": "IUT Robert Schuman à Illkirch-Graffenstaden",
"score": "1ère année", "score": "1ère année",
"courses": [ "courses": [
@ -46,7 +46,7 @@
{ {
"startDate": "2019", "startDate": "2019",
"endDate": "2021", "endDate": "2021",
"studyType": "Diplôme du Baccalauréat Général (Mathématiques et Numériques Sciences Informatiques)", "studyType": "Baccalauréat Général (Mathématiques et Numériques Sciences Informatiques)",
"institution": "Lycée Heinrich Nessel à Haguenau", "institution": "Lycée Heinrich Nessel à Haguenau",
"score": "Mention Assez Bien" "score": "Mention Assez Bien"
} }

View File

@ -1,24 +1,21 @@
{ {
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ESNext",
"module": "ESNext", "module": "ESNext",
"moduleResolution": "node", "moduleResolution": "node",
"allowJs": true, "allowJs": true,
"checkJs": true,
"jsx": "preserve", "jsx": "preserve",
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"noEmit": true, "noEmit": true,
"strict": true,
"types": ["cypress"], "types": ["cypress"],
"baseUrl": ".", "baseUrl": ".",
"esModuleInterop": true, "lib": ["dom", "dom.iterable", "ESNext"],
"forceConsistentCasingInFileNames": true,
"lib": ["dom", "dom.iterable", "esnext"],
"skipLibCheck": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"incremental": true "incremental": true,
"exactOptionalPropertyTypes": false
}, },
"exclude": ["dist", ".next", "out", "next.config.js"], "exclude": ["dist", ".next", "out", "next.config.js"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]

View File

@ -38,6 +38,9 @@ export const getPosts = async (): Promise<PostMetadata[]> => {
const postsWithTime = await Promise.all( const postsWithTime = await Promise.all(
posts.map(async (postFilename) => { posts.map(async (postFilename) => {
const [slug, extension] = postFilename.split('.') const [slug, extension] = postFilename.split('.')
if (slug == null || extension == null) {
throw new Error('Invalid postFilename.')
}
const blogPostPath = path.join(POSTS_PATH, `${slug}.${extension}`) const blogPostPath = path.join(POSTS_PATH, `${slug}.${extension}`)
const blogPostContent = await fs.promises.readFile(blogPostPath, { const blogPostContent = await fs.promises.readFile(blogPostPath, {
encoding: 'utf8' encoding: 'utf8'