aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/_app.tsx
Commit message (Collapse)AuthorAgeFilesLines
* fix(build): handle Next.js errors and warnings during buildArmand Philippot2023-12-161-0/+1
| | | | | | | | | | | | * extract Blog component from BlogPage (paginated) and extract Article component from ArticlePage to avoid `Cannot read properties` errors due to fallback route * fix sitemap build (cjs not supported) * fix eslint warnings (react/jsx-no-literals) * update `start` script since I'm using standalone output * update `postbuild` script since we need to copy public and static files to standalone directory (Next.js does not handle it itself because we should use a CDN...)
* refactor(hooks): remove useSettings hookArmand Philippot2023-11-151-4/+4
| | | | | | | It does not make sense to re-export an existing object through a hook. On some pages both the hook and the object was imported... It is better to use the CONFIG (previously settings) object directly and by doing it we avoid potential errors because of conditional hooks.
* refactor(providers,hooks): rewrite PrismThemeProvider & usePrismThemeArmand Philippot2023-11-111-2/+5
| | | | | | * reuse Theme provider logic * move DOM mutation from provider to hook * add a script to init theme before page load
* feat: replace next-themes with a custom ThemeProviderArmand Philippot2023-11-111-4/+3
| | | | | | | To be honest, next-themes was working fine. However since I use a theme provider for Prism code blocks, some code is duplicated between this app and the library. So I prefer to use a custom Provider without the options I don't need.
* refactor(hooks,provider): move reduce motion setterArmand Philippot2023-11-111-14/+23
| | | | | | | | | | Since the local storage key is not meant to change between the components, it should be set directly inside the app file. So both the local storage and the data attribute should be handle in a provider. I also added a custom document because we need a script to retrieve the stored value in local storage earlier to avoid flashing on hydration.
* refactor(hooks,providers): rewrite useAckee hook and AckeeProviderArmand Philippot2023-11-111-4/+10
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-3/+2
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-4/+4
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* fix(types): add custom types to pageProps with translationArmand Philippot2022-09-211-2/+3
|
* chore: use persistent layoutArmand Philippot2022-05-171-3/+4
| | | | | It prevents to rerender the common components between pages (header, footer...).
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-291-5/+4
| | | | | Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
* refactor: load prism plugins without babelArmand Philippot2022-03-241-1/+1
|
* feat: improve Ackee tracking (#11)Armand Philippot2022-02-231-14/+17
| | | | | | | | | | | | | | | | | * build(deps): add use-ackee hook package * chore: create a context provider for Ackee The provider allows users to change the 'detailed' settings. * chore: add a select menu to choose which info to share with Ackee * chore: add a tooltip for askee settings * chore: replace default select styles with custom styles * chore: register user choice in localstorage * chore: replace Matomo with Ackee in legal notice
* feat: replace Matomo with AckeeArmand Philippot2022-02-211-9/+0
| | | | | I do not use all Matomo features so I was searching a lightweight analytics tools. I will give a try to Ackee.
* chore(matomo): use another dependency to track page viewsArmand Philippot2022-02-141-18/+23
| | | | | | I though the previous package would track all visits with the provided but it seems that I need to add trackPageView on all pages. So I decided to use another package.
* chore: add a new settings to handle prism theme from toolbarArmand Philippot2022-02-011-1/+4
|
* chore: add MatomoArmand Philippot2022-01-311-12/+16
|
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-2/+2
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-14/+12
|
* fix: handle translation with linguiArmand Philippot2022-01-281-20/+8
| | | | | | | | The previous method was not working so I tried a different approach. Translation is loaded but I'm still getting warnings: * Plurals for locale undefined aren't loaded * Text content did not match I can't figure how to fix them...
* feat: implement dark modeArmand Philippot2022-01-171-1/+8
|
* chore: load i18n translations using lingui providerArmand Philippot2021-12-131-1/+29
|
* chore: change app to use a layoutArmand Philippot2021-12-131-3/+4
| | | | I can now insert header/footer on each pages.
* chore: add modern normalize and change global css to scss fileArmand Philippot2021-12-131-1/+1
|
* build: move global styles and pages inside src directoryArmand Philippot2021-12-121-0/+8