diff --git a/app/build-sitemap.ts b/app/build-sitemap.ts new file mode 100644 index 0000000..e31308f --- /dev/null +++ b/app/build-sitemap.ts @@ -0,0 +1,3 @@ +import { sitemap } from "./services/Sitemap"; + +sitemap.generateSitemap(); diff --git a/app/buildPublicUrl.ts b/app/buildPublicUrl.ts index 07a4da9..ac28e0f 100644 --- a/app/buildPublicUrl.ts +++ b/app/buildPublicUrl.ts @@ -4,7 +4,9 @@ export function buildPublicUrl(pageContext: PageContext, resource: string) { const { baseUrl } = pageContext; const url = new URL( resource, - process.env.NODE_ENV === "production" ? "https://memento-dev.fr" : baseUrl, + process.env.NODE_ENV === "production" + ? "https://memento-dev.fr" + : baseUrl || "http://localhost:5500", ).toString(); return url; diff --git a/app/components/QuickLinks.tsx b/app/components/QuickLinks.tsx index b2b46e0..b36fc91 100644 --- a/app/components/QuickLinks.tsx +++ b/app/components/QuickLinks.tsx @@ -3,14 +3,21 @@ import type { IconProps } from "./Icon"; import { Icon } from "./Icon"; import { Link } from "./Link"; +import clsx from "clsx"; type QuickLinksProps = { children: JSXElement; + class?: string; }; export default function QuickLinks(props: QuickLinksProps) { return ( -
+
{props.children}
); @@ -20,6 +27,7 @@ type QuickLinkProps = { title: string; description: string; href: string; + lastEdited?: Date; icon: IconProps["icon"]; }; @@ -29,13 +37,26 @@ QuickLinks.QuickLink = (props: QuickLinkProps) => (
-

+

{props.title}

+ {props.lastEdited && ( +

+ Dernière modification :{" "} + +

+ )} +

{props.description}

diff --git a/app/layouts/DocsLayout.tsx b/app/layouts/DocsLayout.tsx index 1eee27d..c8e44b0 100644 --- a/app/layouts/DocsLayout.tsx +++ b/app/layouts/DocsLayout.tsx @@ -2,6 +2,7 @@ import type { JSXElement } from "solid-js"; import { PrevNextLinks } from "@/components/PrevNextLinks"; import { usePageContext } from "vike-solid/usePageContext"; +import { LatestDocs } from "@/partials/LatestDocs"; import { clientOnly } from "vike-solid/clientOnly"; import { clock } from "solid-heroicons/outline"; import { navigation } from "@/libs/navigation"; @@ -21,21 +22,25 @@ export function DocsLayout(props: DocsLayoutProps) { return ( <> -
-
- - {props.children} -
- -
+
+
+
+ + {props.children} +
+ +
- + +
+ + ); } diff --git a/app/layouts/LayoutDefault.tsx b/app/layouts/LayoutDefault.tsx index 7dbd8d4..19c6858 100755 --- a/app/layouts/LayoutDefault.tsx +++ b/app/layouts/LayoutDefault.tsx @@ -3,8 +3,8 @@ import type { JSXElement } from "solid-js"; import { usePageContext } from "vike-solid/usePageContext"; import { SmoothScroll } from "@/components/SmoothScroll"; import { HeroSection } from "@/partials/HeroSection"; -import { Navigation } from "@/partials/Navigation"; import { clientOnly } from "vike-solid/clientOnly"; +import { Navigation } from "@/partials/Navigation"; import { Header } from "@/partials/Header"; import { Footer } from "@/partials/Footer"; import { DocsLayout } from "./DocsLayout"; @@ -40,7 +40,10 @@ export default function DefaultLayout(props: DefaultLayoutProps) { - {props.children} + +
+ {props.children} +