diff --git a/.env.development b/.env.development index 7eca1a2..1d50ec9 100644 --- a/.env.development +++ b/.env.development @@ -5,4 +5,4 @@ NEXT_PUBLIC_SENTRY_ENV="dev" NEXT_PUBLIC_MATOMO_URL="" NEXT_PUBLIC_MATOMO_SITE_ID="" NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template-nextjs" -NEXT_PUBLIC_BASE_PATH=/template-nextjs +NEXT_PUBLIC_BASE_PATH= diff --git a/.env.production b/.env.production index c43559f..563c451 100644 --- a/.env.production +++ b/.env.production @@ -1,9 +1,9 @@ NEXT_TELEMETRY_DISABLED=1 NEXT_PUBLIC_SITE_URL="https://template.beta.gouv.fr/" -NEXT_PUBLIC_SENTRY_DSN="https://5097055d921644e7b8899c37d9e90780@sentry.incubateur.net/159" +#NEXT_PUBLIC_SENTRY_DSN="https://5097055d921644e7b8899c37d9e90780@sentry.incubateur.net/159" NEXT_PUBLIC_SENTRY_ENV="production" NEXT_PUBLIC_MATOMO_URL="https://stats.beta.gouv.fr" NEXT_PUBLIC_MATOMO_SITE_ID=124 -NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template-nextjs" +NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/albert-docs" PRODUCTION=true -NEXT_PUBLIC_BASE_PATH=/template-nextjs +NEXT_PUBLIC_BASE_PATH=/albert-docs diff --git a/.env.staging b/.env.staging index 5182969..bd88b80 100644 --- a/.env.staging +++ b/.env.staging @@ -4,5 +4,5 @@ NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy" NEXT_PUBLIC_SENTRY_ENV="staging" NEXT_PUBLIC_MATOMO_URL="" NEXT_PUBLIC_MATOMO_SITE_ID="" -NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template" -NEXT_PUBLIC_BASE_PATH=/template-nextjs +NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/albert-docs" +NEXT_PUBLIC_BASE_PATH=/albert-docs diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3afdc68..3db5c2f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,7 +35,7 @@ jobs: SENTRY_URL: https://sentry.incubateur.net SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: betagouv - SENTRY_PROJECT: template-nextjs + SENTRY_PROJECT: albert-docs SENTRY_RELEASE_UPLOAD: true run: | yarn build diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03..52e831b 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/next.config.mjs b/next.config.mjs index 29759f5..fef25e3 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -20,7 +20,7 @@ const moduleExports = { pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"], reactStrictMode: true, swcMinify: true, - output: "export", + //output: "export", webpack: (config) => { config.module.rules.push({ test: /\.(woff2|webmanifest)$/, diff --git a/package.json b/package.json index 70ce9cb..e692c7d 100644 --- a/package.json +++ b/package.json @@ -25,61 +25,63 @@ "build-storybook": "storybook build" }, "dependencies": { - "@codegouvfr/react-dsfr": "^1.9.5", - "@emotion/react": "^11.11.4", + "@codegouvfr/react-dsfr": "^1.16.4", + "@emotion/react": "^11.14.0", "@emotion/server": "^11.11.0", - "@emotion/styled": "^11.11.5", + "@emotion/styled": "^11.14.0", "@gouvfr/dsfr-chart": "^1.0.0", - "@mdx-js/loader": "^3.0.1", - "@mdx-js/react": "^3.0.1", - "@mui/icons-material": "^5.15.14", - "@mui/material": "^5.15.14", + "@mdx-js/loader": "^3.1.0", + "@mdx-js/react": "^3.1.0", + "@mui/icons-material": "^5.16.11", + "@mui/material": "^5.16.11", "@mui/x-data-grid": "^5.17.26", - "@mui/x-date-pickers": "^5.0.11", - "@next/mdx": "^14.1.4", - "@sentry/nextjs": "^7.109.0", - "@socialgouv/matomo-next": "^1.8.1", - "dayjs": "^1.11.10", + "@mui/x-date-pickers": "^5.0.20", + "@next/mdx": "^14.2.20", + "@sentry/nextjs": "^7.120.1", + "@socialgouv/matomo-next": "^1.9.2", + "ai": "^4.0.14", + "dayjs": "^1.11.13", "is-ci": "^3.0.1", - "next": "14.1.4", + "next": "15.1.0", + "nuqs": "^2.2.3", "react": "18.2.0", "react-dom": "18.2.0", "remark-gfm": "^4.0.0", - "tss-react": "^4.9.6" + "tss-react": "^4.9.14" }, "devDependencies": { - "@babel/core": "^7.24.3", - "@playwright/test": "^1.42.1", - "@storybook/addon-actions": "^7.6.17", - "@storybook/addon-docs": "^7.6.17", - "@storybook/addon-essentials": "^7.6.17", - "@storybook/addon-interactions": "^7.6.17", - "@storybook/addon-links": "^7.6.17", + "@babel/core": "^7.26.0", + "@playwright/test": "^1.49.1", + "@storybook/addon-actions": "^7.6.20", + "@storybook/addon-docs": "^7.6.20", + "@storybook/addon-essentials": "^7.6.20", + "@storybook/addon-interactions": "^7.6.20", + "@storybook/addon-links": "^7.6.20", "@storybook/addon-onboarding": "^1.0.11", - "@storybook/blocks": "^7.6.17", - "@storybook/nextjs": "^7.6.17", - "@storybook/test": "^7.6.17", + "@storybook/blocks": "^7.6.20", + "@storybook/nextjs": "^7.6.20", + "@storybook/test": "^7.6.20", "@storybook/testing-library": "^0.2.2", - "@swc-node/register": "^1.9.0", - "@swc/core": "^1.4.11", - "@testing-library/react": "^14.2.2", - "@types/mdx": "^2.0.12", + "@swc-node/register": "^1.10.9", + "@swc/core": "^1.10.1", + "@testing-library/react": "^14.3.1", + "@types/mdx": "^2.0.13", "@types/node": "^18", "@types/react": "18.2.73", "@types/react-dom": "18.2.23", - "@vitejs/plugin-react": "^4.2.1", + "@vitejs/plugin-react": "^4.3.4", "eslint": "8.57.0", "eslint-config-next": "14.1.4", - "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-storybook": "^0.8.0", - "husky": "^9.0.11", - "jsdom": "^24.0.0", - "lint-staged": "^15.2.2", + "husky": "^9.1.7", + "jsdom": "^24.1.3", + "lint-staged": "^15.2.11", "node-talisman": "^1.29.11", - "start-server-and-test": "^2.0.3", - "storybook": "^7.6.17", + "start-server-and-test": "^2.0.9", + "storybook": "^7.6.20", "storybook-dark-mode": "^3.0.3", "typescript": "5.4.3", - "vitest": "^1.4.0" + "vitest": "^1.6.0" } } diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index c52b83b..eadb3aa 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,6 +3,7 @@ import type { AppProps } from "next/app"; import Head from "next/head"; import Link from "next/link"; import { useRouter } from "next/router"; +import { NuqsAdapter } from "nuqs/adapters/next/pages"; import { createEmotionSsrAdvancedApproach } from "tss-react/next"; import { createNextDsfrIntegrationApi } from "@codegouvfr/react-dsfr/next-pagesdir"; @@ -77,36 +78,36 @@ const homeLinkPops = { }; const bottomLinks = [ - { - text: "Conditions d'utilisation", - linkProps: { - href: "/cgu", - }, - }, - { - text: "Statistiques", - linkProps: { - href: "/stats", - }, - }, - { - text: "Budget", - linkProps: { - href: "/budget", - }, - }, - { - text: "Politique de confidentialité", - linkProps: { - href: "/politique-confidentialite", - }, - }, - { - text: "Aide", - linkProps: { - href: "/aide", - }, - }, + // { + // text: "Conditions d'utilisation", + // linkProps: { + // href: "/cgu", + // }, + // }, + // { + // text: "Statistiques", + // linkProps: { + // href: "/stats", + // }, + // }, + // { + // text: "Budget", + // linkProps: { + // href: "/budget", + // }, + // }, + // { + // text: "Politique de confidentialité", + // linkProps: { + // href: "/politique-confidentialite", + // }, + // }, + // { + // text: "Aide", + // linkProps: { + // href: "/aide", + // }, + // }, { text: "Contribuer sur GitHub", linkProps: { @@ -128,7 +129,7 @@ const Layout = ({ children }: { children: ReactNode }) => { return ( - Template | beta.gouv.fr + Albert-docs demo | beta.gouv.fr {contentSecurityPolicy && ( { > )} - + { />
{ }, isActive: router.asPath === "/", }, + // { + // text: "DSFR playground", + // linkProps: { + // href: "/dsfr", + // }, + // isActive: router.asPath === "/dsfr", + // }, + // { + // text: "Mui playground", + // linkProps: { + // href: "/mui", + // }, + // isActive: router.asPath === "/mui", + // }, { - text: "DSFR playground", - linkProps: { - href: "/dsfr", - }, - isActive: router.asPath === "/dsfr", - }, - { - text: "Mui playground", + text: "A propos", linkProps: { - href: "/mui", + href: "/a-propos", }, - isActive: router.asPath === "/mui", - }, - { - text: "Article", - linkProps: { - href: "/article", - }, - isActive: router.asPath === "/article", + isActive: router.asPath === "/a-propos", }, ]} quickAccessItems={[headerFooterDisplayItem]} @@ -200,16 +201,10 @@ const Layout = ({ children }: { children: ReactNode }) => {