Skip to content

Commit 933e5ea

Browse files
committed
Document info about hosting of online documentation
1 parent c8228c8 commit 933e5ea

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

doc/maintainers/haskellstack.org.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
2+
3+
# HaskellStack.org
4+
5+
The domain https://docs.haskellstack.org hosts online documentation for the
6+
Stack project, using [Read the Docs](https://readthedocs.org/) with
7+
[MkDocs](https://www.mkdocs.org/).
8+
9+
## Read the Docs
10+
11+
The Read the Docs project is named
12+
['The Haskell Tool Stack'](https://readthedocs.org/projects/stack/).
13+
14+
The set up on the Read the Docs web site involves two page redirects when there
15+
are HTTP 404 Not Found errors:
16+
17+
/ -> /README/
18+
/README/ -> /
19+
20+
The 'Home' MkDocs page is `doc/README.md`, which is a symbolic link to
21+
`/README.md`.
22+
23+
The `/ -> /README/` redirect ensures that
24+
https://docs.haskellstack.org/en/stable/ (for example) will, if not found,
25+
redirect to https://docs.haskellstack.org/en/stable/README/.
26+
27+
The `/README/ -> /` redirect ensures that
28+
https://docs.haskellstack.org/en/latest/README/ (for example) will, if not
29+
found, redirect to https://docs.haskellstack.org/en/latest/.
30+
31+
MkDocs rendering of `README.md` differed before and after MkDocs 1.0. Prior to
32+
MkDocs 1.0, `README.md` rendered to `/README/index.html`. From MkDocs 1.0,
33+
`README.md` rendered to `/index.html`. The two redirects above ensure that the
34+
Read the Docs flyout works when moving between different versions of the home
35+
page using the flyout.
36+
37+
Stack moved from MkDocs 0.17.3 to MkDocs 1.3.1 after publishing the
38+
documentation for Stack 2.7.5.
39+
40+
A YAML configuration file, `.readthedocs.yaml` is included in the repository
41+
root directory. See https://docs.readthedocs.io/en/stable/config-file/v2.html.
42+
It specifies a Python requirements file in `doc/requirements.txt`.
43+
44+
## MkDocs
45+
46+
The `doc/requirements.txt` pins the version of MkDocs. As at 31 August 2021 it
47+
is set to:
48+
49+
mkdocs==1.3.1
50+
51+
A YAML configuration file, `mkdocs.yml` is included in the repository root
52+
directory. See https://www.mkdocs.org/user-guide/configuration/.
53+
54+
`site_dir: _site` specifies the directory where the output HTML and other files
55+
are created. This directory is added to the `.gitignore` file.
56+
57+
MkDocs 1.3.0 replaced the `pages:` key with the `nav:` key.
58+
59+
The 'Home' MkDocs page is `doc/README.md`, which is a symbolic link to
60+
`/README.md`.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pages:
4747
- Add GHC version: maintainers/ghc.md
4848
- Docker images: maintainers/docker.md
4949
- Upgrading MSYS2: maintainers/msys.md
50+
- HaskellStack.org: maintainers/haskellstack.org.md
5051
- Signing key: SIGNING_KEY.md
5152
- Glossary: glossary.md
5253

0 commit comments

Comments
 (0)