Skip to content

Commit dae3a8b

Browse files
javabstermeta-codesync[bot]
authored andcommitted
Add Docusaurus documentation website
Summary: Sets up a [Docusaurus](https://docusaurus.io/) site under `cinderx/website/` that builds the public CinderX documentation and publishes it to GitHub Pages at https://facebookincubator.github.io/cinderx/. Migrates the existing developer docs out of `Docs/` (`.rst`/`.md`) and `Jit/` into `website/docs/` as Markdown, organized into JIT Compiler, Static Python, and Strict Modules sections with a hand-authored sidebar (`sidebars.ts`). Any internal docs have been moved into the other internal folder. The docs plugin serves pages at the site root, parses `.md` as CommonMark to avoid MDX surprises, and fails the build on broken internal links so doc rot is caught in CI. Adds the `.github/workflows/docs.yml` GitHub Actions workflow to build the site on pull requests touching `cinderx/website/` and deploy to GitHub Pages when those changes land on `main`. Updates the top-level OSS `README.md` to link to the published documentation site. The `website/README.md` documents the layout and how to add or edit pages. open questions: 1. can we purchase the cinderx.com or .org domain name so we dont have to use the github.io url? 2. what do we think about moving the docs into the website folder rather than a top level folder? this is the standard way to organise it with docusaurus 3. I think the performance section is interesting enough to be a page on its own, but for now as we don't have a lot of data I just added it to the intro page (uses the latest stats from the pycon talk) Reviewed By: DinoV, yangdanny97 Differential Revision: D109353395 fbshipit-source-id: f4802f9f69b0be9b87ea7e925c3639e88fc9a06f
1 parent 021efd0 commit dae3a8b

57 files changed

Lines changed: 10579 additions & 1440 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Documentation
2+
3+
on:
4+
# Deploy when docs or the website change on main.
5+
push:
6+
branches: [main]
7+
paths:
8+
- 'cinderx/website/**'
9+
# Build-only check on PRs that touch docs.
10+
pull_request:
11+
paths:
12+
- 'cinderx/website/**'
13+
# Allow manual runs.
14+
workflow_dispatch:
15+
16+
# Allow the deploy job to publish to GitHub Pages via OIDC.
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Only one concurrent deploy; don't cancel an in-progress production deploy.
23+
concurrency:
24+
group: pages
25+
cancel-in-progress: false
26+
27+
jobs:
28+
build:
29+
if: github.repository == 'facebookincubator/cinderx'
30+
name: Build site
31+
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: cinderx/website
35+
steps:
36+
- name: Checkout CinderX
37+
uses: actions/checkout@v6
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 20
43+
cache: yarn
44+
cache-dependency-path: cinderx/website/yarn.lock
45+
46+
- name: Install dependencies
47+
run: yarn install --frozen-lockfile
48+
49+
- name: Build (fails on broken links)
50+
run: yarn build
51+
52+
- name: Upload Pages artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: cinderx/website/build
56+
57+
deploy:
58+
# Only deploy from main; PRs run the build job above as a check.
59+
if: github.repository == 'facebookincubator/cinderx' && github.event_name != 'pull_request'
60+
name: Deploy to GitHub Pages
61+
needs: build
62+
runs-on: ubuntu-latest
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
steps:
67+
- name: Deploy
68+
id: deployment
69+
uses: actions/deploy-pages@v4

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ This will configure the CinderX extension to automatically compile Python
5454
functions to machine code. It will track what functions are called frequently
5555
and compile the hottest ones automatically.
5656

57-
See [the JIT README](cinderx/Jit/README.md) for more details.
57+
See [the JIT documentation](https://facebookincubator.github.io/cinderx/docs/jit) for
58+
more details, or browse the full [CinderX documentation
59+
site](https://facebookincubator.github.io/cinderx/).
5860

5961
## CinderX vs Cinder
6062

cinderx/Docs/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

cinderx/Docs/StrictModules/README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/class_inst_conflict.rst

Lines changed: 0 additions & 48 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/external_modification.rst

Lines changed: 0 additions & 53 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/index.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/loose_slots.rst

Lines changed: 0 additions & 42 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/module_access.rst

Lines changed: 0 additions & 27 deletions
This file was deleted.

cinderx/Docs/StrictModules/guide/conversion/singletons.rst

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)