-
Notifications
You must be signed in to change notification settings - Fork 45
feat(www): add rss and atom feeds #4495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
Cool! @Barsnes is busy today, but I think its best he has a look at this since he's our react router expert :D In the meantime could you please fix the formating/sort errors? :) |
101dba4 to
cab6625
Compare
| const dayStrings = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; | ||
| const monthStrings = [ | ||
| 'Jan', | ||
| 'Feb', | ||
| 'Mar', | ||
| 'Apr', | ||
| 'May', | ||
| 'Jun', | ||
| 'Jul', | ||
| 'Aug', | ||
| 'Sep', | ||
| 'Oct', | ||
| 'Nov', | ||
| 'Dec', | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use Intl.DateTimeFormat here
see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
| @@ -1,4 +1,4 @@ | |||
| import en from '@internal/components/src/_locales/en'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for changing this?
We have @internal/components installed as a package in www
| import i18n from './i18n'; | ||
| import en from './locales/en'; | ||
| import no from './locales/no'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for changing this?
resolves #4492
Summary
Generate RSS and Atom feeds at build time for the blog on the main designsystemet.no website for all available languages. Strongly inspired by how sitemap.xml is generated, as well as many helper functions copied all over github and stackoverflow
In addition these feeds have been checked with https://validator.w3.org/feed/ and should be valid
Lastly, I couldn't get react router to build when using path aliases, so some stuff had to be changed to be relative links unfortunately
Checks
pnpm changesetif relevant)