Skip to content

[FEATURE] Add a documentation site rendered with the Soul guides theme - #27

Open
benjaminkott wants to merge 1 commit into
bmack:mainfrom
benjaminkott:docs
Open

[FEATURE] Add a documentation site rendered with the Soul guides theme#27
benjaminkott wants to merge 1 commit into
bmack:mainfrom
benjaminkott:docs

Conversation

@benjaminkott

Copy link
Copy Markdown

The project is documented in docs/ as reStructuredText and rendered with the TYPO3 Soul guides theme, in four sections: getting started, the Core checkout, a reference, and troubleshooting. The manual is written from the scripts rather than from the README, so it covers what each step actually reads and writes.

ddev docs renders it. The renderer is installed into .renderer/ on first use from the container's PHP, Composer and Node, so nothing is required on the host but DDEV, and the site is written to .site/. Both are dot-directories: generated, gitignored, never edited by hand.

Nothing is written into public/. That docroot belongs to TYPO3, and a generated directory inside it is something Composer and ddev tryout delete both have an opinion about. .ddev/apache/docs.conf maps /_docs/ onto .site/ instead, the same technique DDEV uses for /phpstatus. The leading underscore keeps the path clear of a page slug named "docs".

The post-start hook renders as its sixth step and prints the URL beside the backend one, so the manual is there the first time an instance is opened. The step is never fatal and TRYOUT_DOCS=0 skips it.

Two things the renderer does not do for us:

  • --fail-on-error stops a render that cannot finish, but a :doc: reference that resolves to nothing is only a warning and still exits 0. Both ddev docs and the workflow read the output and fail on any app.WARNING line, so a dead link cannot publish itself quietly.
  • The output directory is created 0700. Apache in the web container would get through as the mapped host user, but a mode that depends on which user the server happens to run as is a 403 waiting for another machine, so the build makes the site readable.

.github/workflows/publish.yml renders on every push and pull request and deploys to GitHub Pages from main. The renderer is built on the runner and thrown away with it; the repository holds documents and no manifest for them.

The project is documented in docs/ as reStructuredText and rendered with
the TYPO3 Soul guides theme, in four sections: getting started, the Core
checkout, a reference, and troubleshooting. The manual is written from
the scripts rather than from the README, so it covers what each step
actually reads and writes.

`ddev docs` renders it. The renderer is installed into .renderer/ on
first use from the container's PHP, Composer and Node, so nothing is
required on the host but DDEV, and the site is written to .site/. Both
are dot-directories: generated, gitignored, never edited by hand.

Nothing is written into public/. That docroot belongs to TYPO3, and a
generated directory inside it is something Composer and `ddev tryout
delete` both have an opinion about. .ddev/apache/docs.conf maps /_docs/
onto .site/ instead, the same technique DDEV uses for /phpstatus. The
leading underscore keeps the path clear of a page slug named "docs".

The post-start hook renders as its sixth step and prints the URL beside
the backend one, so the manual is there the first time an instance is
opened. The step is never fatal and TRYOUT_DOCS=0 skips it.

Two things the renderer does not do for us:

- `--fail-on-error` stops a render that cannot finish, but a :doc:
  reference that resolves to nothing is only a warning and still exits 0.
  Both `ddev docs` and the workflow read the output and fail on any
  app.WARNING line, so a dead link cannot publish itself quietly.
- The output directory is created 0700. Apache in the web container would
  get through as the mapped host user, but a mode that depends on which
  user the server happens to run as is a 403 waiting for another machine,
  so the build makes the site readable.

.github/workflows/publish.yml renders on every push and pull request and
deploys to GitHub Pages from main. The renderer is built on the runner
and thrown away with it; the repository holds documents and no manifest
for them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant