-
Notifications
You must be signed in to change notification settings - Fork 5
Docs/bootstrap docusaurus #688
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
Changes from all commits
4efc464
8908127
ea8f689
33f248d
2101a91
2408d0a
f114be0
397f746
77b5fbb
78da32e
1a3ca5d
090fb2b
6be66b4
72ecfe5
40f7037
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "dev" | ||
| - "main" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Docusaurus | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Install Dependencies | ||
| working-directory: ./docs | ||
| run: | | ||
| echo "installing pnpm" | ||
| npm install -g pnpm | ||
| echo "installing deps for packages" | ||
| pnpm i | ||
|
|
||
| - name: Build website | ||
| working-directory: ./docs | ||
| run: pnpm build | ||
|
|
||
| - name: Upload Build Artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: docs/build | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| needs: build | ||
|
|
||
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
| permissions: | ||
| pages: write # to deploy to Pages | ||
| id-token: write # to verify the deployment originates from an appropriate source | ||
|
|
||
| # Deploy to the github-pages environment | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Dependencies | ||
| /node_modules | ||
|
|
||
| # Production | ||
| /build | ||
|
|
||
| # Generated files | ||
| .docusaurus | ||
| .cache-loader | ||
|
|
||
| # Misc | ||
| .DS_Store | ||
| .env.local | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Website | ||
|
|
||
| This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| yarn | ||
| ``` | ||
|
|
||
| ## Local Development | ||
|
|
||
| ```bash | ||
| 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 | ||
|
|
||
| ```bash | ||
| yarn build | ||
| ``` | ||
|
|
||
| This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
|
||
| ## Deployment | ||
|
|
||
| Using SSH: | ||
|
|
||
| ```bash | ||
| USE_SSH=true yarn deploy | ||
| ``` | ||
|
|
||
| Not using SSH: | ||
|
|
||
| ```bash | ||
| GIT_USER=<Your GitHub username> yarn deploy | ||
| ``` | ||
|
Comment on lines
+7
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align commands with the workspace package manager. Since the repo is configured as a pnpm workspace, consider adding pnpm equivalents (or clarifying yarn is supported) to prevent setup confusion. 📝 Suggested clarification ## Installation
```bash
yarn+If your workspace standardizes on pnpm, use the equivalent pnpm commands. Local Developmentyarn start+If using pnpm in the workspace, run the equivalent pnpm start command for the docs package. In |
||
|
|
||
| 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. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "label": "Getting Started", | ||
| "position": 1, | ||
| "link": { | ||
| "type": "generated-index" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| # Tutorial Intro | ||
|
|
||
| Let's discover **Docusaurus in less than 5 minutes**. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| Get started by **creating a new site**. | ||
|
|
||
| Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. | ||
|
|
||
| ### What you'll need | ||
|
|
||
| - [Node.js](https://nodejs.org/en/download/) version 20.0 or above: | ||
| - When installing Node.js, you are recommended to check all checkboxes related to dependencies. | ||
|
|
||
| ## Generate a new site | ||
|
|
||
| Generate a new Docusaurus site using the **classic template**. | ||
|
|
||
| The classic template will automatically be added to your project after you run the command: | ||
|
|
||
| ```bash | ||
| npm init docusaurus@latest my-website classic | ||
| ``` | ||
|
|
||
| You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. | ||
|
|
||
| The command also installs all necessary dependencies you need to run Docusaurus. | ||
|
|
||
| ## Start your site | ||
|
|
||
| Run the development server: | ||
|
|
||
| ```bash | ||
| cd my-website | ||
| npm run start | ||
| ``` | ||
|
|
||
| The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. | ||
|
|
||
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | ||
|
|
||
| Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "label": "Post Platforms Guide", | ||
| "position": 4, | ||
| "link": { | ||
| "type": "generated-index" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "label": "W3DS Basics", | ||
| "position": 2, | ||
| "link": { | ||
| "type": "generated-index" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||
| --- | ||||||
| sidebar_position: 1 | ||||||
| --- | ||||||
|
|
||||||
| # Tutorial Intro | ||||||
|
|
||||||
| Let's discover **Docusaurus in less than 5 minutes**. | ||||||
|
|
||||||
| ## Getting Started | ||||||
|
|
||||||
| Get started by **creating a new site**. | ||||||
|
|
||||||
| Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. | ||||||
|
|
||||||
| ### What you'll need | ||||||
|
|
||||||
| - [Node.js](https://nodejs.org/en/download/) version 20.0 or above: | ||||||
| - When installing Node.js, you are recommended to check all checkboxes related to dependencies. | ||||||
|
|
||||||
| ## Generate a new site | ||||||
|
|
||||||
| Generate a new Docusaurus site using the **classic template**. | ||||||
|
|
||||||
| The classic template will automatically be added to your project after you run the command: | ||||||
|
|
||||||
| ```bash | ||||||
| npm init docusaurus@latest my-website classic | ||||||
| ``` | ||||||
|
|
||||||
| You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. | ||||||
|
|
||||||
| The command also installs all necessary dependencies you need to run Docusaurus. | ||||||
|
|
||||||
| ## Start your site | ||||||
|
|
||||||
| Run the development server: | ||||||
|
|
||||||
| ```bash | ||||||
| cd my-website | ||||||
| npm run start | ||||||
| ``` | ||||||
|
|
||||||
| The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. | ||||||
|
|
||||||
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid bare URL to satisfy markdownlint (MD034). Wrap the URL in angle brackets or a Markdown link. ✏️ Suggested fix-The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
+The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>.📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.18.1)45-45: Bare URL used (MD034, no-bare-urls) 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "label": "W3DS Protocol", | ||
| "position": 3, | ||
| "link": { | ||
| "type": "generated-index" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| # Tutorial Intro | ||
|
|
||
| Let's discover **Docusaurus in less than 5 minutes**. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| Get started by **creating a new site**. | ||
|
|
||
| Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. | ||
|
|
||
| ### What you'll need | ||
|
|
||
| - [Node.js](https://nodejs.org/en/download/) version 20.0 or above: | ||
| - When installing Node.js, you are recommended to check all checkboxes related to dependencies. | ||
|
|
||
| ## Generate a new site | ||
|
|
||
| Generate a new Docusaurus site using the **classic template**. | ||
|
|
||
| The classic template will automatically be added to your project after you run the command: | ||
|
|
||
| ```bash | ||
| npm init docusaurus@latest my-website classic | ||
| ``` | ||
|
|
||
| You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. | ||
|
|
||
| The command also installs all necessary dependencies you need to run Docusaurus. | ||
|
|
||
| ## Start your site | ||
|
|
||
| Run the development server: | ||
|
|
||
| ```bash | ||
| cd my-website | ||
| npm run start | ||
| ``` | ||
|
|
||
| The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. | ||
|
|
||
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | ||
|
|
||
| Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. |
Uh oh!
There was an error while loading. Please reload this page.