docs: Use meson to build documentation

Let's eat our own dogfood.
pull/4016/head
Thibault Saunier 7 years ago
parent 378bd4df0e
commit 6f72473b24
  1. 5
      docs/README.md
  2. 16
      docs/hotdoc.json
  3. 22
      docs/meson.build
  4. 4
      mesonbuild/modules/hotdoc.py

@ -3,7 +3,7 @@
1. Get [hotdoc](https://hotdoc.github.io/installing.html) (0.8.9 required)
1. Run hotdoc in the docs/ directory:
hotdoc run
../meson/meson.py build/
## Upload
@ -12,5 +12,4 @@ removes the html pages and replaces with the new content.
You can simply run:
hotdoc run --git-upload-activate
ninja -C build/ upload

@ -1,16 +0,0 @@
{
"extra_assets": [
"images/"
],
"html_extra_theme": "theme/extra/",
"include_paths": [
"markdown/"
],
"output": "built_docs/",
"project_name": "Meson documentation",
"project_version": "1.0",
"default-license": "CC-BY-SAv4.0",
"sitemap": "sitemap.txt",
"git_upload_repository": "git@github.com:jpakkane/jpakkane.github.io.git",
"edit_on_github_repository": "https://github.com/mesonbuild/meson/"
}

@ -0,0 +1,22 @@
project('Meson documentation', version: '1.0')
hotdoc = import('hotdoc')
documentation = hotdoc.generate_doc(meson.project_name(),
project_version: meson.project_version(),
sitemap: 'sitemap.txt',
build_by_default: true,
index: 'markdown/index.md',
install: false,
extra_assets: ['images/'],
include_paths: ['markdown'],
default_license: 'CC-BY-SAv4.0',
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,
)
run_target('upload',
command: [find_program('hotdoc'), 'run', '--conf-file', documentation.config_path(),
'--git-upload']
)

@ -132,11 +132,7 @@ class HotdocTargetBuilder:
paths = [paths]
for path in paths:
try:
self.add_extension_paths([path])
except subprocess.CalledProcessError as e:
raise MesonException(
"Could not setup hotdoc extension %s: %s" % (paths, e))
return []

Loading…
Cancel
Save