forked from cursorless-everywhere/cursorless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serve docs folder and API reference on GitHub pages (cursorless-dev#477)
* Inline documentation added for some key functions * Docusaurus minimal set up added * Fixed links to repository sub directories * Added contributing/api using TypeDoc * Updated publish docs workflow * Link hack docs, publish only on main branch * Update website/docusaurus.config.js More robust fixing relative link to repository artifacts Co-authored-by: Pokey Rule <[email protected]> * Addressed review comments; Github workflow to test documentation build added * Update .github/workflows/deploy-docs.yml Co-authored-by: Pokey Rule <[email protected]> * Update .github/workflows/deploy-docs.yml Deployment should be authored by cursor less bot Co-authored-by: Pokey Rule <[email protected]> * Apply pull request suggestion * missing-exports plugging added * Moved contributing; Added new API index page * Avoid copying docs folder * Fix links to GitHub after docs folder move in previous commit * Fixed issue were relative links were rewritten to point to GitHub * Add stub contributing * Fix broken link to svg calculations * Add broken markdown link checker * Update tagline and run dock sours can fig through prettier * Disable markdown link checking in CHANGELOG.md * Factored out typedoc configuration from docusaurus * Prevents broken links like https://.../../ generated * Fixed link giving warning * Fixed typo * Better docusaurus config documentation * Serve folder with /docs/ subdir <- website/build for baseUrl to work correctly * Added CNAME to gh-pages root. Otherwise adhock commits when updated from GitHub Pages UI * Cleanup docs * Docs * More docs * Update docs-build.sh to clean out old artifacts Co-authored-by: Pokey Rule <[email protected]> * runCommand fixed list numbering * Hide API index from the sidebar * Bumped docusaurus dependencies, minor nice improvements * Moved dogs build script to scripts folder * Edit launch configuration to debug docusaurus configuration * Use `www` as default * Switch to www * Fix ci * Trigger notification Co-authored-by: Pokey Rule <[email protected]>
- Loading branch information
Showing
33 changed files
with
11,892 additions
and
284 deletions.
There are no files selected for viewing
This file contains 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,36 @@ | ||
name: Deploy docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.CURSORLESS_BOT_TOKEN }} | ||
- name: Configure GPG Key | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }} | ||
- name: git config | ||
run: | | ||
git config user.name cursorless-bot | ||
git config user.email [email protected] | ||
git config user.signingkey A9387720AFC62221 | ||
git config commit.gpgsign true | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
- run: ./scripts/docs-build.sh | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.CURSORLESS_BOT_TOKEN }} | ||
publish_dir: ./gh-pages-root/ |
This file contains 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,22 @@ | ||
name: Test docs | ||
|
||
on: | ||
pull_request: | ||
branches: main | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
test-docs-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
- run: ./scripts/docs-build.sh | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: gaurav-nelson/github-action-markdown-link-check@v1 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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,55 +1,4 @@ | ||
# Contributing | ||
|
||
### Installation | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
### Running tests | ||
|
||
```sh | ||
yarn run test | ||
``` | ||
|
||
### Adding tests | ||
|
||
See [test-case-recorder.md](docs/contributing/test-case-recorder.md). | ||
|
||
### Adding a new programming language | ||
|
||
See [docs](docs/contributing/adding-a-new-language.md). | ||
|
||
### Adding syntactic scope types to an existing language | ||
|
||
See [parse-tree-patterns.md](docs/contributing/parse-tree-patterns.md). | ||
|
||
### Changing SVGs | ||
|
||
#### SVG preprocessing script | ||
|
||
You'll probably want to run the following to make sure the SVGs have everything they need: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/preprocessSvgHats.js | ||
``` | ||
|
||
This script will add dummy width, height and fill attributes as necessary to appease the regex in `Decorations.ts` | ||
|
||
#### Adding hat adjustments at finish | ||
|
||
While tweaking, the easiest approach is probably to use the | ||
`cursorless.individualHatAdjustments` setting in your settings.json to change | ||
size / alignment so you don't need to refresh every time. Once you're done, you | ||
can paste the settings into `scripts/hatAdjustments/add.ts` and run the following to get | ||
your updates: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/hatAdjustments/add.js | ||
``` | ||
|
||
If instead, you want to average your adjustments with those in main and see the differences to get to yours and main, you can paste the settings into `scripts/hatAdjustments/average.ts` and run: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/hatAdjustments/average.js | ||
``` | ||
Please see the [contributing section](https://www.cursorless.org/docs/contributing) | ||
of the documentation hub. |
This file contains 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,55 @@ | ||
# Contributing | ||
|
||
### Installation | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
### Running tests | ||
|
||
```sh | ||
yarn run test | ||
``` | ||
|
||
### Adding tests | ||
|
||
See [test-case-recorder.md](./test-case-recorder.md). | ||
|
||
### Adding a new programming language | ||
|
||
See [docs](./adding-a-new-language.md). | ||
|
||
### Adding syntactic scope types to an existing language | ||
|
||
See [parse-tree-patterns.md](./parse-tree-patterns.md). | ||
|
||
### Changing SVGs | ||
|
||
#### SVG preprocessing script | ||
|
||
You'll probably want to run the following to make sure the SVGs have everything they need: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/preprocessSvgHats.js | ||
``` | ||
|
||
This script will add dummy width, height and fill attributes as necessary to appease the regex in `Decorations.ts` | ||
|
||
#### Adding hat adjustments at finish | ||
|
||
While tweaking, the easiest approach is probably to use the | ||
`cursorless.individualHatAdjustments` setting in your settings.json to change | ||
size / alignment so you don't need to refresh every time. Once you're done, you | ||
can paste the settings into `scripts/hatAdjustments/add.ts` and run the following to get | ||
your updates: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/hatAdjustments/add.js | ||
``` | ||
|
||
If instead, you want to average your adjustments with those in main and see the differences to get to yours and main, you can paste the settings into `scripts/hatAdjustments/average.ts` and run: | ||
|
||
```sh | ||
yarn run compile && node ./out/scripts/hatAdjustments/average.js | ||
``` |
This file contains 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 @@ | ||
# Cursorless internals | ||
|
||
This document is intended to present a high-level overview of the Cursorless architecture, as well as key pointers to locations in the code base to help contributors get up to speed. | ||
|
||
For the time being, we recommend watching the [internals walk-through videos](https://youtube.com/playlist?list=PLkafpFOBVedScHi0dy_80DsHwnZIOSOTy) and having a look through the API docs, starting from the [`runCommand` function](https://www.cursorless.org/docs/contributing/api/classes/core_commandRunner_CommandRunner.CommandRunner#runcommand). |
This file contains 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
This file contains 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
This file contains 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
This file contains 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 @@ | ||
www.cursorless.org |
This file contains 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,6 @@ | ||
<!doctype html> | ||
<html class="docs-version-current" lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="refresh" content="0; url=./docs" /> | ||
</head> |
This file contains 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
This file contains 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,17 @@ | ||
#!/bin/sh | ||
|
||
# We still need the main project to have all depedencies | ||
# it will be compiled as part of API docs generation | ||
yarn install --frozen-lockfile | ||
|
||
cd website | ||
yarn install --frozen-lockfile | ||
yarn build | ||
cd .. | ||
|
||
# Since baseUrl in Docusaurus is /docs, for links within our website | ||
# to work correctly we need to serve /gh-pages-root with /docs subfolder | ||
# containting the build | ||
rm -rf gh-pages-root/docs | ||
mkdir -p gh-pages-root/docs | ||
cp -r website/build/* gh-pages-root/docs |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.