aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-10-09 22:37:03 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-10-09 23:07:21 +0200
commit2ab5620769f0f364c410d3da94494c123275a3a1 (patch)
treef6baa2a19034273e6d56d08717291f459138667d /docs
parentd7ea066c5cd04c68c9ed2c3f1b7cd981d9b5f6ac (diff)
downloadmeson-2ab5620769f0f364c410d3da94494c123275a3a1.zip
meson-2ab5620769f0f364c410d3da94494c123275a3a1.tar.gz
meson-2ab5620769f0f364c410d3da94494c123275a3a1.tar.bz2
docs: GitHub Action up the JSON docs
Diffstat (limited to 'docs')
-rw-r--r--docs/meson.build49
1 files changed, 41 insertions, 8 deletions
diff --git a/docs/meson.build b/docs/meson.build
index c53abcb..a752965 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -15,27 +15,60 @@ docs_gen = custom_target(
build_by_default: true,
install: false)
-refman_gen = custom_target(
- 'gen_refman',
+genrefman = find_program('./genrefman.py')
+refman_binary = custom_target(
+ 'gen_refman_bin',
input: files('sitemap.txt'),
- output: ['configured_sitemap.txt', 'refman_links.json'],
+ output: 'reference_manual.bin',
depfile: 'reman_dep.d',
command: [
- find_program('./genrefman.py'),
+ genrefman,
+ '-l', 'yaml',
+ '-g', 'pickle',
+ '-o', '@OUTPUT@',
+ '--depfile', '@DEPFILE@',
+ '--force-color',
+ ]
+)
+
+refman_md = custom_target(
+ 'gen_refman_md',
+ input: refman_binary,
+ output: ['configured_sitemap.txt', 'refman_links.json'],
+ command: [
+ genrefman,
+ '-l', 'pickle',
'-g', 'md',
- '-s', '@INPUT@',
+ '-s', files('sitemap.txt'),
+ '-i', '@INPUT@',
'-o', '@OUTPUT0@',
'--link-defs', '@OUTPUT1@',
- '--depfile', '@DEPFILE@',
'--force-color',
'--no-modules',
],
)
+refman_json = custom_target(
+ 'gen_refman_json',
+ build_by_default: true,
+ input: refman_binary,
+ output: 'reference_manual.json',
+ command: [
+ genrefman,
+ '-l', 'pickle',
+ '-g', 'json',
+ '-i', '@INPUT@',
+ '-o', '@OUTPUT@',
+ '--force-color',
+ ],
+)
+
+test('validate_docs', find_program('./jsonvalidator.py'), args: [refman_json])
+
hotdoc = import('hotdoc')
documentation = hotdoc.generate_doc(meson.project_name(),
project_version: meson.project_version(),
- sitemap: refman_gen[0],
+ sitemap: refman_md[0],
build_by_default: true,
depends: docs_gen,
index: 'markdown/index.md',
@@ -49,7 +82,7 @@ documentation = hotdoc.generate_doc(meson.project_name(),
syntax_highlighting_activate: true,
keep_markup_in_code_blocks: true,
extra_extension: meson.current_source_dir() / 'extensions' / 'refman_links.py',
- refman_data_file: refman_gen[1],
+ refman_data_file: refman_md[1],
)
run_target('upload',