-
Notifications
You must be signed in to change notification settings - Fork 10
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
Translations #161
Translations #161
Conversation
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.
This file replaces what used to be a dynamic page in the /pages/
directory. Ideally, all content will live in /content/
and all content management will live in /src/
.
|
||
function getTemplate(page) { | ||
return page.frontmatter.exercise ? exerciseTemplate : pageTemplate; | ||
const path = page.internal.contentFilePath; | ||
const isExerciseIndex = path.includes('index') && path.includes('exercise'); |
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.
Creates a new page template for index.mdx
files that live in /exercises/
.
@@ -46,10 +46,10 @@ | |||
"serve": "gatsby serve", | |||
"clean": "gatsby clean", | |||
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1", | |||
"pub": "rm -rf ../docs && mv public ../docs", | |||
"pubWindows": "rd /S \"../docs\" && move public \"../docs\"" | |||
"pub": "rimraf ../docs && mv public ../docs" |
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.
rimraf
for all the OS's.
import SummaryCard from '../components/summary-card'; | ||
import Translations from '../components/translations'; | ||
|
||
export const SHORTCODES = { Hero, Link, SummaryCard, Translations }; |
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.
These are the React components that are available in .mdx
files.
Sorry, the url you're looking for appears to be missing. Check out the | ||
sitemap below to find your expected page. | ||
</p> | ||
<SiteMap location={location} nodes={nodes} /> |
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.
With the url updates, I went ahead and enhanced the 404 page with a sitemap so a user could hopefully find what they were looking for.
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 liked the sadness
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.
Sadness is always available.
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.
Head
component to be used with Gatsby Head API.
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.
Seems good from a high level perspective.
@mimiflynn Do we have a QA version of the website where we can preview changes in a commit ?
If not, it might be a cool addition :)
@olivierbeau I was just telling @kristen-holmes that I wish we had PR previews to act as QA but we don't have the option at the moment. |
Addresses issue #140
This PR is so large because of the number of files moved into a new directory to support translations. We will need to further review and adjust the content to account for translations support living within the
/exercises/
directory. Because the translations will not be a 1:1 for each curriculum, each language index will be honed to the existing content. I'd like to automate this page, but that will have to live in another PR.