diff --git a/docs/README.md b/docs/README.md index 9fce6c63..133583e8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,6 +21,5 @@ the `Makefile` will be able to generate the jq manpage. You can just run `make jq.1` to build the manpage manually, and `make tests/man.test` to update the manual tests. -To build the website, run `pipenv run python3 build_website.py --root /output` -in the `docs/` directory. To serve them locally, you can run -`python3 -m http.server`. +To build the website, run `pipenv run python3 build_website.py` in the `docs/` directory. +To serve them locally, you can run `python3 -m http.server -d output`. diff --git a/docs/build_website.py b/docs/build_website.py index 5be0ef32..d74a5b09 100755 --- a/docs/build_website.py +++ b/docs/build_website.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -import argparse import glob import itertools from jinja2 import Environment, FileSystemLoader, select_autoescape, pass_context @@ -11,10 +10,6 @@ import re import shutil import yaml -parser = argparse.ArgumentParser() -parser.add_argument('--root', default='') -args = parser.parse_args() - env = Environment( loader=FileSystemLoader('templates'), autoescape=select_autoescape(['html.j2']), @@ -27,8 +22,6 @@ def load_yml_file(fn): env.globals['url'] = 'https://jqlang.org' -env.globals['root'] = args.root - env.filters['search_id'] = lambda input: input.replace(r'`', '') env.filters['section_id'] = lambda input: re.sub( r'[^-a-zA-Z0-9_]', '', input.replace(' ', '-')).lower() diff --git a/docs/content/download/default.yml b/docs/content/download/default.yml index fa94311a..fc015712 100644 --- a/docs/content/download/default.yml +++ b/docs/content/download/default.yml @@ -239,9 +239,9 @@ body: #### Building the documentation jq's documentation is compiled into static HTML using Python. - To build the docs, run `pipenv run python3 build_website.py --root /output` + To build the docs, run `pipenv run python3 build_website.py` in the `docs/` directory. To serve them locally, you can run - `python3 -m http.server`. You'll need a few Python dependencies, + `python3 -m http.server -d output`. You'll need a few Python dependencies, which can be installed by following the instructions in `docs/README.md`. The man page is built by `make jq.1`, or just `make`, also from diff --git a/docs/templates/index.html.j2 b/docs/templates/index.html.j2 index 2df77b62..7b444fa1 100644 --- a/docs/templates/index.html.j2 +++ b/docs/templates/index.html.j2 @@ -8,7 +8,7 @@
-

jq

+

jq

{{ blurb }}

@@ -23,7 +23,7 @@
  • macOS (AMD64)
  • macOS (ARM64)
  • Windows (AMD64)
  • -
  • Other platforms, older versions, and source
  • +
  • Other platforms, older versions, and source
  • Try online at jqplay.org! diff --git a/docs/templates/manual.html.j2 b/docs/templates/manual.html.j2 index 31e92d6d..c5cd1e68 100644 --- a/docs/templates/manual.html.j2 +++ b/docs/templates/manual.html.j2 @@ -36,12 +36,12 @@

    For other versions, see - 1.7, - 1.6, - 1.5, - 1.4, - 1.3 or - development version. + 1.7, + 1.6, + 1.5, + 1.4, + 1.3 or + development version.

    {{ body | markdownify }} @@ -115,6 +115,6 @@ {%- endfor %} } - + diff --git a/docs/templates/shared/_head.html.j2 b/docs/templates/shared/_head.html.j2 index 4e661bdb..280a3401 100644 --- a/docs/templates/shared/_head.html.j2 +++ b/docs/templates/shared/_head.html.j2 @@ -5,16 +5,16 @@ - + - - + + - +