Skip to content

Crawled the documentation to make a snapshot available in structured form in the repo #2

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TERMINUSDB_API_TOKEN=1234
TERMINUSDB_API_ENDPOINT=https://cloud.terminusdb.com/TerminatorsX
TERMINUSDB_TEAM=TerminatorsX
TERMINUSDB_DB=terminusCMS_docs
[email protected]
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
name: Build

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build
- run: npx bun install
- run: npx bun run build
env:
TERMINUSDB_API_TOKEN: ${{ secrets.TERMINUSDB_API_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build
- run: npx bun install
- run: npx bun run build
env:
TERMINUSDB_API_TOKEN: ${{ secrets.TERMINUSDB_API_TOKEN }}
- run: curl -X POST ${{ secrets.CLOUDFLARE_DEPLOY_HOOK }} -o /dev/null
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
#
#
.next
.env
bun.lock
src/menu.json

# dependencies
/node_modules
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,26 @@ The static TerminusCMS and TerminusDB documentation that can be found on
https://terminusdb.com/docs . It is written in NextJS and can be build
by running `npm run build`. Note that the API key is needed for access
to the data product.

## Schema and documentation snapshot

A documentation snapshot can be generated by running the crawler:

```sh
./run-crawler.sh --assets-domain assets.terminusdb.com --max-pages 200 --download-media
```

This will generate a `all_documents.json` file in the `output` directory.

## Schema

The schema for the documentation snapshot is located in the `schema` directory, together with an example of the output and a copy of the menu-structure based on the CMS schema published in the Terminusdb blogposts and based on the generated json files on terminusdb.com/docs in the NEXT hydration section with minor edits.

## Menu structure

The menu structure is located in the `menu-structure.json` file in the `schema` directory and can be loaded directly into TerminusDB using the schema.

## Media

Media files can be downloaded using the command above.

1 change: 1 addition & 0 deletions crawl-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js
Loading