aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/helpers/strings.ts
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): rewrite helpers to output schema in json-ld formatArmand Philippot2023-12-141-0/+3
| | | | | | | | | | | | | * make sure url are absolutes * nest breadcrumb schema in webpage schema * trim HTML tags from content/description * use a regular script instead of next/script (with the latter the schema is not updated on route change) * place the script in document head * add keywords, wordCount and readingTime keys in BlogPosting schema * fix breadcrumbs in search page (without query) * add tests (a `MatchInlineSnapshot` will be better but Prettier 3 is not supported yet)
* refactor(pages): refine Project pagesArmand Philippot2023-12-081-2/+4
| | | | | | | | | | | * refactor ProjectOverview component to let consumers handle the value * extract project overview depending on Github to avoid fetching Github API if the project is not on Github * wrap dynamic import in a useMemo hook to avoid infinite rerender * fix table of contents by adding a useMutationObserver hook to refresh headings tree (without it useHeadingsTree is not retriggered once the dynamic import is done) * add Cypress tests
* refactor(pages): improve HomepageArmand Philippot2023-11-291-0/+13
| | | | | | | | | * move custom homepage components that does not require props to the MDX file (links should not need to be translated here but where they are defined) * move SEO title and meta desc to MDX file * make Page component the wrapper instead of using a React fragment * fix MDX module types
* refactor(hooks,provider): move reduce motion setterArmand Philippot2023-11-111-12/+20
| | | | | | | | | | 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: rewrite Prism hooks and providersArmand Philippot2022-05-191-0/+10
| | | | | It avoid some hydratation errors on project pages (not in article however) and the hooks are now reusable.
* chore: add Project single pagesArmand Philippot2022-05-131-0/+29