Releases: analythium/analythium.github.io
Docs ready for a template
This release of the source
branch is a Docusaurus (v2) template that can be customized further.
It comes with presets for:
- documentation
- blog/news
- sensible defaults
- GA tag added for hub.analythium.io subdomain
Customization
If using for docs in another repor inside the analythium GitHub organization, here is how to modify:
CNAME
If it is a root domain/subdomain, edit the /static/CNAME
file as needed. If it is a folder (repo/project) in an already existing root domain/subdomain, delete the CNAME
file.
Change <repo_name>
in docusaurus.config.js
:
module.exports = {
baseUrl: '/<repo_name>',
organizationName: 'analythium', # change this if different person/org
projectName: '<repo_name>',
...
}
If using a different git hosting platform than GitHub, set the githubHost
option (see API reference). Change other options as needed.
Edit .github/workflows/docs.yml
Change <source_branch>
(e.g. master
) and <target_branch>
(e.g. gh-pages
):
name: Build & Deploy
on:
push:
branches:
- <source_branch>
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: <source_branch>
BRANCH: <target_branch>
FOLDER: build
You might also have tu change the command at the Install
step: if the docs are in the /website
folder, add cd website && npm ci
.
Styling
Edit the color definitions in /src/css/custom.css
and modify/replace the image assets in /static/img
.