diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-01-10 07:48:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 14:48:34 +0200 |
commit | c18a9715b83ef94a56c064edee511162998001cc (patch) | |
tree | 886b73902c9c9767b987b88d74b1429013ab7930 /docs/meson.build | |
parent | 832bcac0a793d63f4bf093c12580b4a605155476 (diff) | |
download | meson-c18a9715b83ef94a56c064edee511162998001cc.zip meson-c18a9715b83ef94a56c064edee511162998001cc.tar.gz meson-c18a9715b83ef94a56c064edee511162998001cc.tar.bz2 |
Hotdoc: use template for Commands.md instead of generating the entire file (#8154)
* doc: fix hotdoc misuse for dynamically generated content
hotdoc has a native include feature for including files inline. Use this
to generate one file for each dynamically generated code block, and
include that file in Commands.md; see:
https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax
This permits us to move back to using the in-tree version of the hotdoc
*.md sources, thus fixing the incorrect inclusion of "builddir/" in the
"Edit on github" links which resulted from using copies as the source.
Fixes #8061
* doc: call the dummy file a "stamp" as it is a better known term
Diffstat (limited to 'docs/meson.build')
-rw-r--r-- | docs/meson.build | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/docs/meson.build b/docs/meson.build index 496588d..fa80512 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -2,22 +2,14 @@ project('Meson documentation', version: '1.0') cur_bdir = meson.current_build_dir() -# Copy all files to build dir, since HotDoc uses relative paths -run_command( - files('../tools/copy_files.py'), - '-C', meson.current_source_dir(), - '--output-dir', cur_bdir, - 'markdown', 'theme', 'sitemap.txt', - check: true) - # Only the script knows which files are being generated docs_gen = custom_target( 'gen_docs', input: files('markdown/index.md'), - output: 'gen_docs.dummy', + output: 'gen_docs.stamp', command: [ files('../tools/regenerate_docs.py'), - '--output-dir', join_paths(cur_bdir, 'markdown'), + '--output-dir', cur_bdir, '--dummy-output-file', '@OUTPUT@', ], build_by_default: true, @@ -26,15 +18,15 @@ docs_gen = custom_target( hotdoc = import('hotdoc') documentation = hotdoc.generate_doc(meson.project_name(), project_version: meson.project_version(), - sitemap: join_paths(cur_bdir, 'sitemap.txt'), + sitemap: 'sitemap.txt', build_by_default: true, depends: docs_gen, - index: join_paths(cur_bdir, 'markdown/index.md'), + index: 'markdown/index.md', install: false, extra_assets: ['images/'], - include_paths: [join_paths(cur_bdir, 'markdown')], + include_paths: ['markdown', cur_bdir], default_license: 'CC-BY-SAv4.0', - html_extra_theme: join_paths(cur_bdir, 'theme', 'extra'), + html_extra_theme: join_paths('theme', 'extra'), git_upload_repository: 'git@github.com:jpakkane/jpakkane.github.io.git', edit_on_github_repository: 'https://github.com/mesonbuild/meson', syntax_highlighting_activate: true, |