Skip to content

Commit 5ef9db3

Browse files
authored
Add Docusaurus Handbook skeleton (#1)
1 parent 5f338ac commit 5ef9db3

18 files changed

Lines changed: 14369 additions & 2 deletions

.github/workflows/ci_cd.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: CI/CD
3+
4+
on:
5+
push:
6+
branches:
7+
- 'main'
8+
pull_request:
9+
branches:
10+
- 'main'
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
19+
NODE_OPTIONS: --max-old-space-size=6144
20+
21+
jobs:
22+
build:
23+
name: Build
24+
runs-on: ubuntu-22.04
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
31+
with:
32+
node-version: '20'
33+
cache: 'yarn'
34+
cache-dependency-path: yarn.lock
35+
36+
- name: Install dependencies
37+
run: yarn install --immutable
38+
39+
- name: Build
40+
run: yarn build
41+
42+
- name: Upload Artifact
43+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
44+
with:
45+
path: build
46+
47+
deploy:
48+
name: Deploy
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-22.04
53+
if: success() && github.ref == 'refs/heads/main'
54+
needs: build
55+
# Allow one concurrent deployment
56+
concurrency:
57+
group: "pages"
58+
cancel-in-progress: true
59+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
60+
permissions:
61+
contents: read
62+
pages: write
63+
id-token: write
64+
steps:
65+
- name: Setup Pages
66+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
67+
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
71+

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Yarn
12+
.pnp.*
13+
.yarn/*
14+
!.yarn/patches
15+
!.yarn/plugins
16+
!.yarn/releases
17+
!.yarn/sdks
18+
!.yarn/versions
19+
20+
# IDEs
21+
.history/
22+
.idea/
23+
.settings/
24+
.project
25+
.vscode/
26+
*.iml
27+
28+
# Misc
29+
.DS_Store
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
35+
npm-debug.log*
36+
yarn-debug.log*
37+
yarn-error.log*

.yarn/releases/yarn-4.4.1.cjs

Lines changed: 925 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
5+
nodeLinker: node-modules
6+
7+
yarnPath: .yarn/releases/yarn-4.4.1.cjs

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
handbook.openremote.io

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1-
# handbook
2-
OpenRemote Handbook
1+
# OpenRemote Handbook
2+
3+
[![GitHub Actions Status](https://github.com/openremote/handbook/actions/workflows/ci_cd.yml/badge.svg?branch=main)](https://github.com/openremote/handbook/actions/workflows/ci_cd.yml)
4+
5+
This repository contains the OpenRemote handbook hosted on https://handbook.openremote.io/ as Markdown files in the [docs directory](docs).
6+
7+
The documentation website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
8+
9+
### Installation
10+
11+
```shell
12+
$ yarn
13+
```
14+
15+
### Local Development
16+
17+
```shell
18+
$ yarn start
19+
```
20+
21+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
22+
23+
### Build
24+
25+
```shell
26+
$ yarn build
27+
```
28+
29+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
30+
31+
When the static content has been generated it can be tested using:
32+
33+
```shell
34+
$ yarn serve
35+
```
36+
37+
### Deployment
38+
39+
The deployment is done automatically by a GitHub Actions workflow when commits are pushed to the "main" branch.
40+
41+
It can also be done manually using the "deploy" command.
42+
43+
Using SSH:
44+
45+
```shell
46+
$ USE_SSH=true yarn deploy
47+
```
48+
49+
Not using SSH:
50+
51+
```shell
52+
$ GIT_USER=<Your GitHub username> yarn deploy
53+
```
54+
55+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docs/introduction.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Introduction

docusaurus.config.ts

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
import type {Config} from '@docusaurus/types';
2+
import type * as Preset from '@docusaurus/preset-classic';
3+
4+
const config: Config = {
5+
title: 'OpenRemote Handbook',
6+
tagline: 'The 100% Open Source IoT Platform for Manufacturers and Integrators',
7+
favicon: 'img/favicon.ico',
8+
9+
// Set the production url of your site here
10+
url: 'https://handbook.openremote.io',
11+
// Set the /<baseUrl>/ pathname under which your site is served
12+
// For GitHub pages deployment, it is often '/<projectName>/'
13+
baseUrl: '/',
14+
15+
// GitHub pages deployment config.
16+
// If you aren't using GitHub pages, you don't need these.
17+
organizationName: 'openremote', // Usually your GitHub org/user name.
18+
projectName: 'handbook', // Usually your repo name.
19+
20+
onBrokenLinks: 'throw',
21+
onBrokenMarkdownLinks: 'warn',
22+
23+
// Even if you don't use internationalization, you can use this field to set
24+
// useful metadata like html lang. For example, if your site is Chinese, you
25+
// may want to replace "en" with "zh-Hans".
26+
i18n: {
27+
defaultLocale: 'en',
28+
locales: ['en'],
29+
},
30+
31+
presets: [
32+
[
33+
'classic',
34+
{
35+
docs: {
36+
sidebarPath: './sidebars.ts',
37+
editCurrentVersion: true,
38+
editUrl: 'https://github.com/openremote/handbook/edit/main/',
39+
},
40+
blog: {
41+
showReadingTime: true,
42+
editUrl: 'https://github.com/openremote/handbook/edit/main/',
43+
},
44+
theme: {
45+
customCss: [
46+
'./src/css/styles.css',
47+
]
48+
},
49+
gtag: {
50+
trackingID: "GTM-MWP6C7F",
51+
anonymizeIP: false,
52+
},
53+
} satisfies Preset.Options,
54+
],
55+
],
56+
57+
themeConfig: {
58+
// Replace with your project's social card
59+
image: 'img/openremote-social-card.svg',
60+
navbar: {
61+
title: 'OpenRemote',
62+
logo: {
63+
alt: 'OpenRemote Logo',
64+
src: 'img/logo.svg',
65+
},
66+
items: [
67+
{
68+
type: 'docsVersionDropdown',
69+
position: 'left',
70+
dropdownActiveClassDisabled: false,
71+
},
72+
{
73+
href: 'https://forum.openremote.io/',
74+
label: 'Forum',
75+
position: 'right',
76+
},
77+
{
78+
href: 'https://github.com/openremote/openremote',
79+
label: 'GitHub',
80+
position: 'right',
81+
},
82+
{
83+
href: 'https://www.openremote.io/',
84+
label: 'Website',
85+
position: 'right',
86+
},
87+
],
88+
},
89+
footer: {
90+
style: 'dark',
91+
links: [
92+
{
93+
title: 'Handbook',
94+
items: [
95+
{
96+
label: 'Introduction',
97+
to: '/docs/introduction',
98+
},
99+
],
100+
},
101+
{
102+
title: 'Community',
103+
items: [
104+
{
105+
label: 'Forum',
106+
href: 'https://forum.openremote.io/',
107+
},
108+
{
109+
label: 'Facebook',
110+
href: 'https://www.facebook.com/openremote',
111+
},
112+
{
113+
label: 'Instagram',
114+
href: 'https://www.instagram.com/openremote/',
115+
},
116+
{
117+
label: 'LinkedIn',
118+
href: 'https://www.linkedin.com/company/openremote/',
119+
},
120+
{
121+
label: 'Reddit',
122+
href: 'https://www.reddit.com/r/openremote/',
123+
},
124+
{
125+
label: 'X',
126+
href: 'https://x.com/OpenRemotePro/',
127+
},
128+
{
129+
label: 'YouTube',
130+
href: 'https://www.youtube.com/c/openremotepro',
131+
},
132+
],
133+
},
134+
{
135+
title: 'More',
136+
items: [
137+
{
138+
label: 'Website',
139+
to: 'https://www.openremote.io/',
140+
},
141+
{
142+
label: 'News',
143+
to: 'https://www.openremote.io/news/',
144+
},
145+
{
146+
label: 'Demo',
147+
href: 'https://www.openremote.io/demo/',
148+
},
149+
{
150+
label: 'Source Code',
151+
href: 'https://github.com/openremote/openremote/',
152+
},
153+
{
154+
label: 'OSS Licensing',
155+
href: 'https://openremote.io/open-source/',
156+
},
157+
{
158+
label: 'Contact',
159+
href: 'https://www.openremote.io/contact/',
160+
},
161+
{
162+
label: 'Privacy Policy',
163+
href: 'https://openremote.io/privacy-policy/',
164+
},
165+
],
166+
},
167+
],
168+
copyright: ${new Date().getFullYear()} OpenRemote, Inc. All Rights Reserved.`,
169+
},
170+
algolia: {
171+
apiKey: '18c8ff9992cf5a0b37acb9b008fa7cd9',
172+
appId: 'TVHZ0YEM1U',
173+
indexName: 'openremote',
174+
},
175+
} satisfies Preset.ThemeConfig,
176+
};
177+
178+
export default config;

0 commit comments

Comments
 (0)