Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,36 @@ git submodule update --init

## Update the Golioth Docs submodule

When updates are made to the Golioth Docs repo, the can be pulled into this one by updating the submodule:
When updates are made to the Golioth Docs repo, they can be pulled into this one by updating the submodule to the tip of its default branch (`main`):

```console
git submodule foreach git pull
git submodule update --remote --merge
```

This leaves the updated submodule pointer staged, so commit it to record the update:

```console
git add submodule-goliothdocs
git commit -m "Update Golioth Docs submodule"
```

> **Note:** Don't use `git submodule foreach git pull`. Submodules are checked out in a detached-HEAD state, so a plain `git pull` has no branch to track and fails with *"You are not currently on a branch."*

## Testing and Deploying

The Docusaurus site lives in the `website/` directory, so run all npm commands from there.

Docs pages can be tested locally:

```bash
cd website
npm install
npm start
```

Docs can be deployed to the live page by running:

```bash
cd website
npm run deploy
```
2 changes: 1 addition & 1 deletion submodule-goliothdocs
46 changes: 45 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const darkCodeTheme = themes.dracula;
const config = {
title: 'Developer Training',
tagline: 'Learn about Golioth and Zephyr, with hands-on exercises',
url: 'https://golioth.github.io',
url: 'https://training.golioth.io',
baseUrl: '/',
trailingSlash: false,
onBrokenLinks: 'throw',
Expand Down Expand Up @@ -38,9 +38,53 @@ const config = {

plugins: [ 'docusaurus-plugin-image-zoom' ],

themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import('@easyops-cn/docusaurus-search-local').PluginOptions} */
({
hashed: true,
indexBlog: false,
docsRouteBasePath: '/',
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
}),
],
],

// Structured data so search engines and LLMs can classify the site as a course.
headTags: [
{
tagName: 'script',
attributes: { type: 'application/ld+json' },
innerHTML: JSON.stringify({
'@context': 'https://schema.org',
'@type': 'Course',
name: 'Golioth & Zephyr Developer Training',
description:
'Free, hands-on training for building IoT firmware with Zephyr RTOS and connecting devices to the Golioth cloud.',
provider: {
'@type': 'Organization',
name: 'Golioth',
url: 'https://golioth.io',
},
url: 'https://training.golioth.io',
}),
},
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Default social-card image used for Open Graph / Twitter previews.
image: 'img/Zephyr-Classroom.jpg',
metadata: [
{
name: 'keywords',
content:
'Golioth, Zephyr, Zephyr RTOS, IoT, embedded firmware, nRF9160, nRF7002, LightDB, OTA firmware update, devicetree, Kconfig, west, developer training',
},
],
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: false,
Expand Down
Loading