| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The Typescript mapped types was useful for autocompletion in fetchers
but their are harder to maintain. I think it's better to keep each
query close to its fetcher to have a better understanding of the
fetched data. So I:
* colocate queries with their own fetcher
* colocate mutations with their own mutator
* remove Typescript mapped types for queries and mutations
* move data convertors inside graphql services
* rename most of data types and fetchers
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
It makes it easier to change a route if needed and it avoid typo
mistakes.
I also refactored a bit the concerned files to be complient with the
new ESlint config. However, I should rewrite the pages to reduce
the number of statements.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
I also renamed and changed the format of some environment variables so
I can reuse them inside the CSP security header.
|
| | |
|
| |
|
|
|
|
| |
I cannot use formatjs to translate the website baseline since I need
an async function to load the message. If I use the getIntlInstance
helper outside NextJS, webpack is complaining about fs and path.
|
| | |
|
| |
|
|
|
| |
I will need the country code, so I think it makes more sense to gather
them inside the same property.
|
| | |
|
| | |
|
|
|
I could loop until hasNextPage is false, but I'm not sure if it is the
best solution. So, for now, only the first 100 posts will be added to
the file.
|