aboutsummaryrefslogtreecommitdiffstats
path: root/next.config.js
Commit message (Collapse)AuthorAgeFilesLines
* test(e2e): fix broken Cypress testsArmand Philippot2023-12-141-1/+5
| | | | | | | | Since #93db24b MSW is used in Cypress tests to intercept requests. Some tests relied on WordPress data so it becames broken. Tests are now successful but there are still some issues with hydration because all GraphQL requests are not intercepted and data are mixed between WordPress and fixtures.
* test(services): add tests for createComment mutationArmand Philippot2023-12-111-0/+6
| | | | | * add Jest test * add a Cypress test in article pages spec
* refactor(pages): refine RSS feedArmand Philippot2023-11-301-0/+5
| | | | | | | | | | | * add favicon * add item categories * add item image * add item author * add item update date (it seems `date` is used as update date by Feed) * change copyright format * fix ESlint errors * fix atom and json links
* fix(pages): redirect /feed to /feed.xmlArmand Philippot2023-11-301-1/+2
| | | | | | I don't know when it happens but the rewrites was no longer working. Also it is more a redirect than a rewrite so I switch the setting key and set "permanent" to true.
* refactor(components,pages): extract MDX components mapping from pagesArmand Philippot2023-11-221-1/+10
| | | | | | | Instead of repeating the overriding on each pages, we should define it in one place and reuse it in pages. By default it is not possible to override native HTML tags with MDX so I added a plugin in next config to allow it.
* fix: generate an id for each headings in the page main contentsArmand Philippot2023-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | Since #be4d907 the ids was no longer addded to headings in useHeadingsTree hook. It was a bad practice to manipulate the DOM that way. However, I did not move the implementation elsewhere... To fix this, I now use rehype-slug on both markdown contents and html string coming from WordPress. I'm not sure the dynamic imports are really useful here since the table of contents is on almost all pages but Jest was failing with regular import because of ESM. It is the only thing that makes the tests functional again so... However if we want to test the `updateContentTree` function, Jest fails for the same reason. So I decided to not test this function. I've already spend too much time on this issue. Another problem: the ToC on projects page. Currently we use the ref on the body but the page contents are imported dynamically so the hook is executed before the contents are loaded. It makes the ToC empty... We should refactor the pages so we can use the ref directly on the imported contents.
* build(config): replace deprecated config keysArmand Philippot2023-11-161-4/+9
| | | | | | | * `images.domains` has been replaced with `images.remotePatterns` * remove `experimental.scrollRestoration` (I don't find the doc anymore and removing it seems to change nothing so I assume we don't need it now)
* build(eslint): improve ESlint rulesArmand Philippot2023-10-241-5/+5
| | | | | | In my opinion, next/core-web-vitals rules are too loose so I added a custom config to improve code consistency and to enforce best practices.
* build: convert project to esmArmand Philippot2023-10-241-6/+11
|
* build(deps): upgrade dependencies (Next v12.2.3)Armand Philippot2022-07-221-1/+1
| | | | | The Next config has also been updated: the experimental config `outputStandalone` is no longer experimental.
* fix: update CSP for media srcArmand Philippot2022-05-211-2/+2
| | | | Some webm video was not loaded because of Content Security Policy.
* chore: use a different configuration depending on app envArmand Philippot2022-03-041-2/+7
| | | | | | It will be useful with Docker. Instead of cloning the project with a different configuration, I can manage two different configuration thanks to dotenv and some checking inside the app.
* feat: use Docker in production (#12)Armand Philippot2022-02-251-0/+1
| | | | | | | | | | | * build: add experimental feature outputStandalone With this option, Next.js can create a standalone folder with the necessary files for a production deployment. It will be useful for Docker deployment. * chore: add Docker configuration * docs: update README with Docker instructions
* fix: allow Ackee domain in CSP connect-srcArmand Philippot2022-02-221-2/+2
|
* chore: update CSPArmand Philippot2022-02-221-2/+3
|
* feat: replace Matomo with AckeeArmand Philippot2022-02-211-9/+9
| | | | | I do not use all Matomo features so I was searching a lightweight analytics tools. I will give a try to Ackee.
* fix: update content security policy (#5)Armand Philippot2022-02-161-4/+4
| | | | | It seems Matomo need to be declared at least in connect-src in addition to script-src. See: https://fr.matomo.org/faq/general/faq_20904/
* fix: typo in CSPArmand Philippot2022-02-161-2/+2
|
* feat: add HTTP security headersArmand Philippot2022-02-151-2/+75
| | | | | I also renamed and changed the format of some environment variables so I can reuse them inside the CSP security header.
* build: remove the no-parser config for formatjsArmand Philippot2022-02-121-5/+0
| | | | | | | I don't know if I misunderstand the purpose of no-parser but I can't get it to work with strings containing a variable or plurals. They are always fallback to the english message. So I decided to disable this config.
* build(deps): add bundle analyzer to examine bundle sizes on buildArmand Philippot2022-02-021-1/+5
|
* build(deps): remove linguiArmand Philippot2022-01-291-4/+0
|
* build: configure webpack to use react-intl without parserArmand Philippot2022-01-291-1/+6
|
* fix: handle translation with linguiArmand Philippot2022-01-281-2/+1
| | | | | | | | 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...
* chore: add scroll restoration for posts listArmand Philippot2022-01-181-0/+3
| | | | | | It would be nice to restore focus as well, but it seems I can not retrieve which posts was click on history back. I should find an alternative later.
* chore: add a redirection from /feed to /feed.xmlArmand Philippot2022-01-131-0/+8
|
* build(webpack): allow PDF importArmand Philippot2022-01-101-0/+4
|
* build: configure next to use mdx filesArmand Philippot2021-12-241-1/+11
|
* chore: display featuredImage and meta on posts listArmand Philippot2021-12-161-0/+5
|
* build: remove powered by headerArmand Philippot2021-12-131-0/+1
|
* build: add sass configArmand Philippot2021-12-121-0/+7
|
* build: configure svgr to use svg as componentsArmand Philippot2021-12-121-4/+30
|
* build: configure lingui js for i18nArmand Philippot2021-12-121-1/+15
|
* chore: initial commitArmand Philippot2021-12-121-0/+4