-
Notifications
You must be signed in to change notification settings - Fork 0
Add Docusaurus Handbook skeleton #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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* |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| handbook.openremote.io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,55 @@ | ||
| # handbook | ||
| OpenRemote Handbook | ||
| # OpenRemote Handbook | ||
|
|
||
| [](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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| # Introduction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.