Lessons and resources in the DDaT Codelabs curriculum, built with the Gatsby static site generator.
A static site for hosting lessons and modules in the DDaT Codelabs curriculum.
This site consumes markdown documents and converts them into HTML using React component syntax and the Gatsby static site generator. Changes here automatically affect the live site.
This site understands three kinds of content:
Currently live on the web here.
We value contributions from everyone. Pull requests and issues are welcome.
We try to abide by the guidance published by the GOV.UK content design community.
That means we value things like:
Lessons are stored as markdown files in the /lessons
folder.
You can edit these via the Github web interface or in your local text editor.
A non-standard element to be aware of: <div class="todo"></div>
renders a turquiose box used to present tasks the user needs to accomplish before moving on.
If you want to add images, upload them to the /lessons
folder, and after building they will be available at the site’s root. For instance, an image called example.jpg
would be found at the URL /example.jpg
.
Each lesson has frontmatter used to track:
Frontmatter must be correctly filled out or the site won’t rebuild.
Modules and pages are also markdown files stored in the /modules
and /pages
directories, respectively.
Images can be uploaded to the respective folder and included in the same way as lessons.
Modules have frontmatter used to track:
Pages also have an order property that determines their position on the header menu.
You can make minor tweaks to this right here on the web, but for major work, you should download and run the software locally. This will give you real-time feedback and a nicer developer experience.
You need git
, node
and npm
installed first.
npm install --global gatsby-cli
git clone https://github.com/jhackett1/learn-to-code
.npm install
.gatsby develop
. You should be able to access it on port 8000.Like all Gatsby sites, you can also build graphQL queries using graphiQL, which should be available at localhost:8000/___graphql
.
When you’re finished, commit your changes and Netlify’s CI server will try to deploy them.