summaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* refactor: update graphql queries (#14)Armand Philippot2022-03-091-3/+3
| | | | | | | | | | | | | | | | | | * refactor: replace postBy query postBy is now deprecated in WPGraphQL v1.7 * refactor: update post comments query PostBy is deprecated and it is now possible to use the post ID to query comments. * refactor: update get topic by slug query topicBy is deprecated * refactor: update get thematic by slug query thematicBy is deprecated
* feat: provide pagination for users with js disabled (#13)Armand Philippot2022-03-091-1/+16
| | | | | | | | | * chore: add a Pagination component * chore: add blog pages * chore: fallback to page number based navigation if JS disabled * chore: update translation
* chore: use a different configuration depending on app envArmand Philippot2022-03-042-8/+17
| | | | | | 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: improve Ackee tracking (#11)Armand Philippot2022-02-231-0/+57
| | | | | | | | | | | | | | | | | * 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-4/+5
| | | | | I do not use all Matomo features so I was searching a lightweight analytics tools. I will give a try to Ackee.
* feat: add HTTP security headersArmand Philippot2022-02-152-5/+5
| | | | | I also renamed and changed the format of some environment variables so I can reuse them inside the CSP security header.
* fix: update comments list when a new comment is sendArmand Philippot2022-02-141-8/+6
| | | | | The comments list was static before. If an user posted a comment, even after it was approved, the comments list was keeping the old state.
* chore(matomo): use another dependency to track page viewsArmand Philippot2022-02-142-7/+4
| | | | | | 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: improve RSS feed generation timeArmand Philippot2022-02-131-10/+5
|
* chore(toc): exclude comments section for headings listArmand Philippot2022-02-121-1/+1
|
* fix(prism): translate toolbar buttons on single article pagesArmand Philippot2022-02-101-49/+0
| | | | | The translation was not always loaded the first time. So I decided to put the prism attributes manually instead.
* chore(prism): translate color scheme toggle buttonArmand Philippot2022-02-081-0/+21
|
* refactor(prism): rename color scheme attributes and remove prefixArmand Philippot2022-02-082-32/+25
|
* fix: handle getStaticPaths fallbackArmand Philippot2022-02-021-0/+12
| | | | | | | | I had errors with next build because of fallback. I need to return early if the path does not exists, if not Next complains about undefined variables. I don't think it was related but I also fix the paths format in getStaticPaths, I forgot the params object in some dynamic routes.
* chore: add a new settings to handle prism theme from toolbarArmand Philippot2022-02-011-0/+162
|
* chore: add MatomoArmand Philippot2022-01-311-0/+7
|
* chore: add a Prism plugin to set code blocks themeArmand Philippot2022-01-311-0/+252
|
* chore(baseline): handle baseline translation manuallyArmand Philippot2022-01-302-2/+5
| | | | | | 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.
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-293-7/+23
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-292-6/+39
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-75/+17
|
* fix: handle translation with linguiArmand Philippot2022-01-281-22/+72
| | | | | | | | 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: update project preview appearanceArmand Philippot2022-01-271-3/+3
|
* chore: wrap dates with time tagArmand Philippot2022-01-251-0/+16
|
* chore: add reading time in posts metaArmand Philippot2022-01-251-0/+8
|
* refactor(project): replace repo api call method with hook and swrArmand Philippot2022-01-241-0/+23
| | | | | | | | | | Instead of using post slug and an environment variable to fetch repo data, I use the given repo in each project MDX file. It allows me to fetch data from another user/organization if needed. To make it work, I no longer provide the full URL in MDX file. The new format is: "User/repo-slug". I also replaced the fetch method with SWR to improve caching and to avoid React complaining about cleanup useEffect.
* refactor: rename all subject occurrences into topicArmand Philippot2022-01-231-26/+26
| | | | | I change the name in graphql endpoint, so I decided to repercute this change here.
* chore: add single project viewArmand Philippot2022-01-201-36/+50
|
* chore: add a page for projectsArmand Philippot2022-01-201-0/+72
|
* refactor(config): move defaultLocale as property of config.localesArmand Philippot2022-01-192-2/+3
| | | | | I will need the country code, so I think it makes more sense to gather them inside the same property.
* chore: add structured data using schema.org and JSON-LDArmand Philippot2022-01-191-0/+2
| | | | I also added the featured image on single article.
* chore: add all posts from CMS to feedArmand Philippot2022-01-131-2/+10
|
* chore: add different feed formats (feed.xml, atom.xml, feed.json)Armand Philippot2022-01-131-2/+1
|
* chore: generate feedArmand Philippot2022-01-121-0/+54
| | | | | | 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.
* chore: add title and meta desc to subjects and thematicsArmand Philippot2022-01-111-2/+13
|
* fix(toc): render on each route change and exclude aside titlesArmand Philippot2022-01-111-7/+20
| | | | | | On subject pages for example, the table of contents was not updated on route change. So I added router.asPath as dependency of useEffect. I also changed the query to exclude all titles in aside (ToC, widgets).
* chore(meta): display subjects instead of thematics on Thematic pagesArmand Philippot2022-01-111-0/+2
|
* refactor: improve regex readability by grouping partsArmand Philippot2022-01-041-1/+1
|
* refactor: avoid useless assignement before return statementArmand Philippot2022-01-042-11/+4
|
* chore: add line numbers to all prism blocks and translate copy buttonArmand Philippot2022-01-031-0/+51
|
* chore: display subjects list under articlesArmand Philippot2022-01-031-1/+19
|
* chore: display comments as a treeArmand Philippot2021-12-271-1/+30
| | | | | | I was displaying comments without the parent/children link. Now, each child is displayed under its parent. I also remove the reply button for children to avoid too many child depth.
* chore: replace CV content with mdx contentArmand Philippot2021-12-241-23/+0
| | | | | Since I replace the other pages, there is no reason to fetch this page content through WP GraphQL.
* chore: add a table of contentsArmand Philippot2021-12-211-7/+1
|
* chore: add a hook to build headings treeArmand Philippot2021-12-212-0/+118
|
* refactor: rewrite types and servicesArmand Philippot2021-12-202-1/+229
| | | | | | | I was repeating myself a lot in services. So I rewrited the different functions to improve readability and I extracted some formatting functions to put them in utils. I also rewrited/reorganized some types to keep consistent names.
* chore: display year between blog postsArmand Philippot2021-12-161-0/+19
|
* chore: load i18n translations using lingui providerArmand Philippot2021-12-131-0/+35