Skip to content

Commit

Permalink
docs: Use meson to build documentation
Browse files Browse the repository at this point in the history
Let's eat our own dogfood.
  • Loading branch information
thiblahute committed Aug 28, 2018
1 parent 378bd4d commit 6f72473
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
16 changes: 0 additions & 16 deletions docs/hotdoc.json

This file was deleted.

22 changes: 22 additions & 0 deletions docs/meson.build
Original file line number Diff line number Diff line change
@@ -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: '[email protected]: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']
)
6 changes: 1 addition & 5 deletions mesonbuild/modules/hotdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,7 @@ def setup_extension_paths(self, paths):
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))
self.add_extension_paths([path])

return []

Expand Down

0 comments on commit 6f72473

Please sign in to comment.