Compare commits
2 Commits
f9a908e3f0
...
a7f874c64f
| Author | SHA1 | Date | |
|---|---|---|---|
| a7f874c64f | |||
| f56de743c7 |
24
app/data/certifications/index/page.md
Normal file
24
app/data/certifications/index/page.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
title: Certifications Memento Dev
|
||||||
|
description: Tu te prépares à passer un examen de certification, comme DWWM, CDA ou encore CDUI ? Découvre donc de bons conseils pour t'aider à te préparer au mieux !
|
||||||
|
tags: []
|
||||||
|
---
|
||||||
|
|
||||||
|
Tu te prépares à passer un examen de certification, comme DWWM, CDA ou encore CDUI ?
|
||||||
|
Découvre donc de bons conseils pour t'aider à te préparer au mieux !
|
||||||
|
|
||||||
|
## Certifications couvertes sur le Memento
|
||||||
|
|
||||||
|
- **DWWM** : Développeur Web et Web Mobile
|
||||||
|
- **CDA** : Concepteur Développeur d'Applications
|
||||||
|
- **CDUI** : Concepteur Développeur d'Interfaces Utilisateurs
|
||||||
|
|
||||||
|
## Besoin d'un accompagnement ?
|
||||||
|
|
||||||
|
{% callout type="note" title="Accompagnement" %}
|
||||||
|
En qualité de jury habilité sur les titres professionnels **DWWM**, **CDA** et **CDUI**, je peux t'accompagner dans ta préparation à l'examen.
|
||||||
|
|
||||||
|
Qu'il s'agisse d'une aide à la **compréhension des référentiels**, d'une **préparation à l'oral** ou d'un **accompagnement sur un projet**, je suis là pour t'aider à réussir !
|
||||||
|
|
||||||
|
Tu peux me contacter par [email _(gauthier@gauthierdaniels.fr)_](mailto:gauthier@gauthierdaniels?subject=Demande%20d'accompagnement%20pour%20le%20titre%20professionnel%20X) pour bénéficier d'un accompagnement personnalisé et de conseils adaptés à tes besoins.
|
||||||
|
{% /callout %}
|
||||||
27
app/data/docs/documentations/page.md
Normal file
27
app/data/docs/documentations/page.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: Documentations du Memento
|
||||||
|
description: Plonge toi dans une documentation synthétique et concise, conçue pour les développeurs ou passionnés de l'information en quête de savoir !
|
||||||
|
tags: []
|
||||||
|
---
|
||||||
|
|
||||||
|
## Documentations rédigées
|
||||||
|
|
||||||
|
- [React](/docs/react)
|
||||||
|
|
||||||
|
## Documentations en cours de rédaction
|
||||||
|
|
||||||
|
- [Merise](/docs/merise)
|
||||||
|
|
||||||
|
## Documentations à venir
|
||||||
|
|
||||||
|
- HTML
|
||||||
|
- CSS
|
||||||
|
- JavaScript
|
||||||
|
- PHP
|
||||||
|
- SQL
|
||||||
|
- Node.js
|
||||||
|
- Express.js
|
||||||
|
- UML
|
||||||
|
- Maquettage
|
||||||
|
|
||||||
|
Et bien d'autres encore ! 😄
|
||||||
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Documentation Memento Dev
|
title: Synthèses et ressources pour développeurs
|
||||||
description: Plonge toi dans une documentation synthétique et concise, conçue pour les développeurs ou passionnés de l'information en quête de savoir !
|
description: Plonge toi dans une documentation synthétique et concise, conçue pour les développeurs ou passionnés de l'information en quête de savoir !
|
||||||
tags: []
|
tags: []
|
||||||
---
|
---
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
export const navigation = [
|
export const navigation = [
|
||||||
{
|
{
|
||||||
title: "Préambule",
|
title: "Préambule",
|
||||||
links: [{ title: "Memento Dev", href: "/docs" }],
|
type: "global",
|
||||||
|
links: [
|
||||||
|
{ title: "Memento Dev", href: "/" },
|
||||||
|
{ title: "Certifications", href: "/certifications" },
|
||||||
|
{ title: "Documentations", href: "/docs" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "React",
|
title: "React",
|
||||||
|
type: "documentation",
|
||||||
links: [
|
links: [
|
||||||
{ title: "Introduction", href: "/docs/react" },
|
{ title: "Introduction", href: "/docs/react" },
|
||||||
{ title: "Initialisation", href: "/docs/react/initialisation" },
|
{ title: "Initialisation", href: "/docs/react/initialisation" },
|
||||||
@ -18,6 +24,7 @@ export const navigation = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Merise",
|
title: "Merise",
|
||||||
|
type: "documentation",
|
||||||
links: [
|
links: [
|
||||||
{ title: "Introduction", href: "/docs/merise" },
|
{ title: "Introduction", href: "/docs/merise" },
|
||||||
{ title: "Dictionnaire de données", href: "/docs/merise/dictionnaire-de-donnees" },
|
{ title: "Dictionnaire de données", href: "/docs/merise/dictionnaire-de-donnees" },
|
||||||
@ -26,6 +33,7 @@ export const navigation = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Communauté",
|
title: "Communauté",
|
||||||
|
type: "global",
|
||||||
links: [
|
links: [
|
||||||
{ title: "Influenceurs", href: "/docs/communaute/influenceurs" },
|
{ title: "Influenceurs", href: "/docs/communaute/influenceurs" },
|
||||||
{ title: "Partages et réutilisations", href: "/docs/communaute/partages" },
|
{ title: "Partages et réutilisations", href: "/docs/communaute/partages" },
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
// https://vike.dev/Head
|
|
||||||
|
|
||||||
import React from "react";
|
|
||||||
import logoUrl from "../assets/logo.svg";
|
import logoUrl from "../assets/logo.svg";
|
||||||
|
|
||||||
export default function HeadDefault() {
|
export default function HeadDefault() {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import vikeReact from "vike-react/config";
|
|
||||||
import type { Config } from "vike/types";
|
import type { Config } from "vike/types";
|
||||||
import Layout from "../layouts/LayoutDefault.js";
|
|
||||||
|
import Layout from "@/layouts/LayoutDefault";
|
||||||
|
import vikeReact from "vike-react/config";
|
||||||
|
|
||||||
// Default config (can be overridden by pages)
|
// Default config (can be overridden by pages)
|
||||||
// https://vike.dev/config
|
// https://vike.dev/config
|
||||||
@ -13,7 +14,7 @@ export default {
|
|||||||
|
|
||||||
// https://vike.dev/head-tags
|
// https://vike.dev/head-tags
|
||||||
title: "Memento Dev",
|
title: "Memento Dev",
|
||||||
description: "Demo showcasing Vike",
|
description: "Découvrez des synthèses et ressources open-source dans le développement informatique.",
|
||||||
|
|
||||||
htmlAttributes: {
|
htmlAttributes: {
|
||||||
class: "h-full antialiased",
|
class: "h-full antialiased",
|
||||||
|
|||||||
16
app/pages/certifications/+Page.tsx
Normal file
16
app/pages/certifications/+Page.tsx
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import type { Data } from "./+data";
|
||||||
|
|
||||||
|
import { useData } from "vike-react/useData";
|
||||||
|
import Markdoc from "@markdoc/markdoc";
|
||||||
|
import nodes from "@/markdoc/nodes";
|
||||||
|
import tags from "@/markdoc/tags";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
const { doc, estimatedReadingTime } = useData<Data>();
|
||||||
|
|
||||||
|
const parsedDoc = Markdoc.parse(doc.content);
|
||||||
|
const transformedDoc = Markdoc.transform(parsedDoc, { nodes, tags, variables: { estimatedReadingTime } });
|
||||||
|
|
||||||
|
return Markdoc.renderers.react(transformedDoc, React);
|
||||||
|
}
|
||||||
38
app/pages/certifications/+data.ts
Normal file
38
app/pages/certifications/+data.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import type { PageContext } from "vike/types";
|
||||||
|
|
||||||
|
import { snippetsService } from "@/services/SnippetsService";
|
||||||
|
import { docsService } from "@/services/DocsService";
|
||||||
|
import { readingTime } from "reading-time-estimator";
|
||||||
|
import { useConfig } from "vike-react/useConfig";
|
||||||
|
import buildTitle from "@/pages/buildTitle";
|
||||||
|
import { render } from "vike/abort";
|
||||||
|
|
||||||
|
export type Data = Awaited<ReturnType<typeof data>>;
|
||||||
|
|
||||||
|
export async function data(pageContext: PageContext) {
|
||||||
|
const config = useConfig();
|
||||||
|
|
||||||
|
const { key } = pageContext.routeParams;
|
||||||
|
|
||||||
|
const doc = await docsService.getDoc("certifications", key);
|
||||||
|
|
||||||
|
if (!doc) {
|
||||||
|
throw render(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
const readingTimeObject = readingTime(doc.content, 300, "fr");
|
||||||
|
|
||||||
|
config({
|
||||||
|
title: buildTitle(doc.title),
|
||||||
|
description: doc.description,
|
||||||
|
});
|
||||||
|
|
||||||
|
docsService.transform(doc);
|
||||||
|
|
||||||
|
const snippets = Array.from(doc.snippets).map((snippetPath) => ({
|
||||||
|
path: snippetPath,
|
||||||
|
content: snippetsService.getFromCache(snippetPath),
|
||||||
|
}));
|
||||||
|
|
||||||
|
return { doc, estimatedReadingTime: readingTimeObject.text, snippets };
|
||||||
|
}
|
||||||
16
app/pages/certifications/+route.ts
Normal file
16
app/pages/certifications/+route.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import type { PageContext } from "vike/types";
|
||||||
|
|
||||||
|
const routeRegex = /^\/certifications\/(.*)$/;
|
||||||
|
|
||||||
|
export function route(pageContext: PageContext) {
|
||||||
|
if (pageContext.urlPathname === "/certifications") {
|
||||||
|
return { routeParams: { key: "index" } };
|
||||||
|
}
|
||||||
|
|
||||||
|
const match = pageContext.urlPathname.match(routeRegex);
|
||||||
|
if (!match) return false;
|
||||||
|
|
||||||
|
const [, key] = match;
|
||||||
|
|
||||||
|
return { routeParams: { key } };
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@ const routeRegex = /^\/docs\/(.*)$/;
|
|||||||
|
|
||||||
export function route(pageContext: PageContext) {
|
export function route(pageContext: PageContext) {
|
||||||
if (pageContext.urlPathname === "/docs") {
|
if (pageContext.urlPathname === "/docs") {
|
||||||
return { routeParams: { key: "index" } };
|
return { routeParams: { key: "documentations" } };
|
||||||
}
|
}
|
||||||
|
|
||||||
const match = pageContext.urlPathname.match(routeRegex);
|
const match = pageContext.urlPathname.match(routeRegex);
|
||||||
|
|||||||
@ -1,7 +1,16 @@
|
|||||||
|
import type { Data } from "./+data";
|
||||||
|
|
||||||
|
import { useData } from "vike-react/useData";
|
||||||
|
import Markdoc from "@markdoc/markdoc";
|
||||||
|
import nodes from "@/markdoc/nodes";
|
||||||
|
import tags from "@/markdoc/tags";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
const { doc, estimatedReadingTime } = useData<Data>();
|
||||||
<main className="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">
|
|
||||||
<h1 className={"font-bold text-3xl pb-4"}>My Vike app</h1>
|
const parsedDoc = Markdoc.parse(doc.content);
|
||||||
</main>
|
const transformedDoc = Markdoc.transform(parsedDoc, { nodes, tags, variables: { estimatedReadingTime } });
|
||||||
);
|
|
||||||
|
return Markdoc.renderers.react(transformedDoc, React);
|
||||||
}
|
}
|
||||||
|
|||||||
36
app/pages/index/+data.ts
Normal file
36
app/pages/index/+data.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import type { PageContext } from "vike/types";
|
||||||
|
|
||||||
|
import { snippetsService } from "@/services/SnippetsService";
|
||||||
|
import { docsService } from "@/services/DocsService";
|
||||||
|
import { readingTime } from "reading-time-estimator";
|
||||||
|
import { useConfig } from "vike-react/useConfig";
|
||||||
|
import buildTitle from "@/pages/buildTitle";
|
||||||
|
import { render } from "vike/abort";
|
||||||
|
|
||||||
|
export type Data = Awaited<ReturnType<typeof data>>;
|
||||||
|
|
||||||
|
export async function data(pageContext: PageContext) {
|
||||||
|
const config = useConfig();
|
||||||
|
|
||||||
|
const doc = await docsService.getDoc("docs", "index");
|
||||||
|
|
||||||
|
if (!doc) {
|
||||||
|
throw render(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
const readingTimeObject = readingTime(doc.content, 300, "fr");
|
||||||
|
|
||||||
|
config({
|
||||||
|
title: buildTitle(doc.title),
|
||||||
|
description: doc.description,
|
||||||
|
});
|
||||||
|
|
||||||
|
docsService.transform(doc);
|
||||||
|
|
||||||
|
const snippets = Array.from(doc.snippets).map((snippetPath) => ({
|
||||||
|
path: snippetPath,
|
||||||
|
content: snippetsService.getFromCache(snippetPath),
|
||||||
|
}));
|
||||||
|
|
||||||
|
return { doc, estimatedReadingTime: readingTimeObject.text, snippets };
|
||||||
|
}
|
||||||
@ -1,17 +0,0 @@
|
|||||||
import React, { useState } from "react";
|
|
||||||
|
|
||||||
export function Counter() {
|
|
||||||
const [count, setCount] = useState(0);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className={
|
|
||||||
"inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
||||||
}
|
|
||||||
onClick={() => setCount((count) => count + 1)}
|
|
||||||
>
|
|
||||||
Counter {count}
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -152,6 +152,7 @@ class DocsService {
|
|||||||
public async getDoc(namespace: "docs" | "certifications", key: string) {
|
public async getDoc(namespace: "docs" | "certifications", key: string) {
|
||||||
try {
|
try {
|
||||||
await this.fetchDocs();
|
await this.fetchDocs();
|
||||||
|
console.log(this.cache.keys());
|
||||||
const doc = this.getFromCache(`/${namespace}/${key}`);
|
const doc = this.getFromCache(`/${namespace}/${key}`);
|
||||||
|
|
||||||
if (!doc) {
|
if (!doc) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user