Skip to content

Commit 1dfb53f

Browse files
authored
docs: create documentation site (#95)
1 parent 9c15c6e commit 1dfb53f

32 files changed

+8738
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Deploy to GitHub Pages
11+
12+
runs-on: ubuntu-latest
13+
14+
defaults:
15+
run:
16+
working-directory: docs
17+
18+
steps:
19+
- name: 📚 Git Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: ⚙️ Setup Node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 16.x
26+
cache: yarn
27+
cache-dependency-path: docs/yarn.lock
28+
29+
- name: 📦 Install Dependencies
30+
run: yarn install --frozen-lockfile
31+
32+
- name: ✨ Check Format
33+
run: yarn run format:check
34+
35+
- name: 🧹 Lint
36+
run: yarn run lint
37+
38+
- name: 👷 Build website
39+
run: yarn build
40+
41+
- name: ☁️ Deploy to GitHub Pages
42+
uses: peaceiris/actions-gh-pages@v3
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./build
46+
user_name: github-actions[bot]
47+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.github/workflows/docs.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: docs
2+
3+
on: pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
defaults:
10+
run:
11+
working-directory: docs
12+
13+
steps:
14+
- name: 📚 Git Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: ⚙️ Setup Node
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16.x
21+
cache: yarn
22+
cache-dependency-path: docs/yarn.lock
23+
24+
- name: 📦 Install Dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: ✨ Check Format
28+
run: yarn run format:check
29+
30+
- name: 🧹 Lint
31+
run: yarn run lint
32+
33+
- name: 👷 Build website
34+
run: yarn build

docs/.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @type {import('@types/eslint').Linter.BaseConfig}
3+
*/
4+
module.exports = {
5+
extends: ['plugin:@docusaurus/recommended'],
6+
plugins: ['@docusaurus'],
7+
parserOptions: {
8+
ecmaVersion: 'latest',
9+
sourceType: 'module',
10+
},
11+
parser: '@babel/eslint-parser',
12+
};

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
/build
3+
/public/build
4+
.env
5+
.docusaurus

docs/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

docs/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 📚 Dart Frog Site
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### ⚙️ Installation
6+
7+
```
8+
yarn install
9+
```
10+
11+
### 🧑‍💻 Local Development
12+
13+
```
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### 📦 Build
20+
21+
```
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.

docs/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/docs/basics/_category_.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Basics 📚",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "5 minutes to learn the most important Dart Frog concepts."
7+
}
8+
}

docs/docs/basics/congratulations.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
5+
# Congratulations! 🎉
6+
7+
You have just learned the **basics of Dart Frog**.
8+
9+
## Additional Resources 📚
10+
11+
- [Example][example_link]
12+
- [Roadmap][roadmap_link]
13+
- [Blog post][blog_link]
14+
- [Livestream demo][livestream_link]
15+
16+
:::info
17+
Did you know the [dart2js][dart2js_compiler_link] compiler [used to be called frog][dart2js_frog_pr_link]?
18+
:::
19+
20+
[blog_link]: https://verygood.ventures/blog/dart-frog
21+
[dart2js_compiler_link]: https://dart.dev/tools/dart2js
22+
[dart2js_frog_pr_link]: https://github.com/dart-lang/sdk/issues/2194
23+
[example_link]: https://github.com/VeryGoodOpenSource/dart_frog/tree/main/example
24+
[livestream_link]: https://youtu.be/N7l0b09c6DA
25+
[roadmap_link]: https://github.com/VeryGoodOpenSource/dart_frog/blob/main/ROADMAP.md

0 commit comments

Comments
 (0)