-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zbynek Konecny
committed
Apr 10, 2024
1 parent
7f43471
commit b5f017e
Showing
5 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |