Skip to content

Commit ac71810

Browse files
Switch docs to Docusaurus (#134)
* Switch to using docusaurus * Tweak action to deploy * remove cache * update links * spicepod -> pod * pod -> spicepod * Remove unlisted * update readme * Fix getting started link
1 parent 7dcc4ed commit ac71810

77 files changed

Lines changed: 14873 additions & 2771 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/build_and_publish.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,33 @@ on:
88
- v*
99
pull_request:
1010

11+
permissions:
12+
contents: write
13+
1114
jobs:
1215
deploy:
1316
runs-on: ubuntu-latest
1417
steps:
15-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1619
with:
17-
submodules: recursive # Fetch Hugo themes (true OR recursive)
18-
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
20+
fetch-depth: 0
1921

20-
- name: Setup Hugo
21-
uses: peaceiris/actions-hugo@v2
22+
- uses: actions/setup-node@v4
2223
with:
23-
hugo-version: "0.123.8"
24-
extended: true
24+
node-version: 20
2525

26-
- name: Install requirements
26+
- name: Install dependencies
2727
working-directory: spiceaidocs
28-
run: |
29-
npm install
30-
cd themes/docsy && npm install
28+
run: npm install
3129

32-
- name: Build
30+
- name: Build website
3331
working-directory: spiceaidocs
34-
run: hugo --minify
32+
run: npm run build
3533

3634
- name: Deploy
3735
if: ${{ github.event_name != 'pull_request' && startswith(github.ref, 'refs/tags/v') }}
3836
uses: peaceiris/actions-gh-pages@v3
3937
with:
4038
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
publish_dir: ./spiceaidocs/public
39+
publish_dir: ./spiceaidocs/build
4240
cname: docs.spiceai.org

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ This repo contains the markdown files which generate the above website. See belo
88

99
## Overview
1010

11-
The Spice.ai docs are built using [Hugo](https://gohugo.io/) with the [Docsy](https://docsy.dev) theme, hosted on [GitHub Pages](https://pages.github.com/).
11+
The Spice.ai docs are built using [Docusaurus](https://docusaurus.io/) hosted on [GitHub Pages](https://pages.github.com/).
1212

13-
The [spiceaidocs](./spiceaidocs) directory contains the hugo project, markdown files, and theme configurations.
13+
The [spiceaidocs](./spiceaidocs) directory contains the Docusaurus project, markdown files, and theme configurations.
1414

1515
## Pre-requisites
1616

17-
- [Hugo extended version](https://gohugo.io/getting-started/installing)
1817
- [Node.js](https://nodejs.org/en/)
18+
- [Docusaurus](https://docusaurus.io/docs/installation)
1919

2020
## Environment setup
2121

@@ -32,17 +32,10 @@ git clone https://github.com/spiceai/docs.git
3232
cd ./docs/spiceaidocs
3333
```
3434

35-
4. Update submodules:
36-
37-
```sh
38-
git submodule update --init --recursive
39-
```
40-
41-
5. Install npm packages:
35+
4. Install npm packages:
4236

4337
```sh
4438
npm install
45-
cd themes/docsy && npm install
4639
```
4740

4841
## Run local server
@@ -51,10 +44,10 @@ cd themes/docsy && npm install
5144
2. Run
5245

5346
```sh
54-
hugo server
47+
npm start
5548
```
5649

57-
3. Navigate to `http://localhost:1313/`
50+
3. Navigate to `http://localhost:3000/`
5851

5952
## Update docs
6053

spiceaidocs/.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*

spiceaidocs/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ npm install
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ npm 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+
$ npm run build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.

spiceaidocs/archetypes/default.md

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

spiceaidocs/assets/scss/_styles_project.scss

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

spiceaidocs/assets/scss/_variables_project.scss

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

spiceaidocs/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+
};

spiceaidocs/config.toml

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

0 commit comments

Comments
 (0)