Skip to content

Commit

Permalink
Add reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbynek Konecny committed Apr 10, 2024
1 parent 7f43471 commit b5f017e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
schedule:
- cron: '42 5 * * *'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -34,7 +36,7 @@ jobs:
with:
node-version: '20.x'
- run: npm ci
- run: npx antora --fetch antora-playbook.yml
- run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ content:
start_paths:
- en
- it
- url: https://github.com/geogebra/integration
start_paths:
- reference
urls:
html_extension_style: indexify
ui:
Expand Down
16 changes: 16 additions & 0 deletions makelocal.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import fs from 'fs';
import yaml from 'js-yaml';

// Read YAML file
const inputFilePath = 'antora-playbook.yml';
const outputFilePath = 'playbook-local.yml';

const yamlData = fs.readFileSync(inputFilePath, 'utf8');
const parsedData = yaml.load(yamlData);
parsedData.content.sources[0].url = '../manual'
parsedData.content.sources[1].url = '../integration'
// Write parsed YAML data to another file
const yamlString = yaml.dump(parsedData);
fs.writeFileSync(outputFilePath, yamlString, 'utf8');

console.log('YAML file successfully written to', outputFilePath);
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"scripts": {
"build": "antora --fetch antora-playbook.yml",
"dev": "node makelocal.mjs && antora --fetch playbook-local.yml"
},
"devDependencies": {
"@antora/cli": "3.1.7",
"@antora/site-generator": "3.1.7"
"@antora/site-generator": "3.1.7",
"js-yaml": "^4.1.0"
}
}

0 comments on commit b5f017e

Please sign in to comment.