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
71 changes: 71 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Simple workflow for deploying static content to GitHub Pages
name: CI/CD

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
NODE_OPTIONS: --max-old-space-size=6144

jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build

- name: Upload Artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: build

deploy:
name: Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
if: success() && github.ref == 'refs/heads/main'
needs: build
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# IDEs
.history/
.idea/
.settings/
.project
.vscode/
*.iml

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.1.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.1.cjs
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
handbook.openremote.io
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# handbook
OpenRemote Handbook
# OpenRemote Handbook

[![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)

This repository contains the OpenRemote handbook hosted on https://handbook.openremote.io/ as Markdown files in the [docs directory](docs).

The documentation website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```shell
$ yarn
```

### Local Development

```shell
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```shell
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

When the static content has been generated it can be tested using:

```shell
$ yarn serve
```

### Deployment

The deployment is done automatically by a GitHub Actions workflow when commits are pushed to the "main" branch.

It can also be done manually using the "deploy" command.

Using SSH:

```shell
$ USE_SSH=true yarn deploy
```

Not using SSH:

```shell
$ GIT_USER=<Your GitHub username> yarn deploy
```

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.
5 changes: 5 additions & 0 deletions docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 1
---

# Introduction
178 changes: 178 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'OpenRemote Handbook',
tagline: 'The 100% Open Source IoT Platform for Manufacturers and Integrators',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://handbook.openremote.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'openremote', // Usually your GitHub org/user name.
projectName: 'handbook', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editCurrentVersion: true,
editUrl: 'https://github.com/openremote/handbook/edit/main/',
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/openremote/handbook/edit/main/',
},
theme: {
customCss: [
'./src/css/styles.css',
]
},
gtag: {
trackingID: "GTM-MWP6C7F",
anonymizeIP: false,
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/openremote-social-card.svg',
navbar: {
title: 'OpenRemote',
logo: {
alt: 'OpenRemote Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: false,
},
{
href: 'https://forum.openremote.io/',
label: 'Forum',
position: 'right',
},
{
href: 'https://github.com/openremote/openremote',
label: 'GitHub',
position: 'right',
},
{
href: 'https://www.openremote.io/',
label: 'Website',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Handbook',
items: [
{
label: 'Introduction',
to: '/docs/introduction',
},
],
},
{
title: 'Community',
items: [
{
label: 'Forum',
href: 'https://forum.openremote.io/',
},
{
label: 'Facebook',
href: 'https://www.facebook.com/openremote',
},
{
label: 'Instagram',
href: 'https://www.instagram.com/openremote/',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/openremote/',
},
{
label: 'Reddit',
href: 'https://www.reddit.com/r/openremote/',
},
{
label: 'X',
href: 'https://x.com/OpenRemotePro/',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/c/openremotepro',
},
],
},
{
title: 'More',
items: [
{
label: 'Website',
to: 'https://www.openremote.io/',
},
{
label: 'News',
to: 'https://www.openremote.io/news/',
},
{
label: 'Demo',
href: 'https://www.openremote.io/demo/',
},
{
label: 'Source Code',
href: 'https://github.com/openremote/openremote/',
},
{
label: 'OSS Licensing',
href: 'https://openremote.io/open-source/',
},
{
label: 'Contact',
href: 'https://www.openremote.io/contact/',
},
{
label: 'Privacy Policy',
href: 'https://openremote.io/privacy-policy/',
},
],
},
],
copyright: `© ${new Date().getFullYear()} OpenRemote, Inc. All Rights Reserved.`,
},
algolia: {
apiKey: '18c8ff9992cf5a0b37acb9b008fa7cd9',
appId: 'TVHZ0YEM1U',
indexName: 'openremote',
},
} satisfies Preset.ThemeConfig,
};

export default config;
Loading