Skip to content

Commit d0e572b

Browse files
committed
Website: document plan for new architecture
1 parent ef642df commit d0e572b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

docs/architecture/ADR009-Website.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# ADR009: Website
2+
3+
**Status**: Accepted but unimplemented.
4+
5+
## Context
6+
7+
quick-lint-js needs a website for marketing purposes but also as a way to
8+
distribute installation and usage documentation.
9+
10+
Static HTML files are easy to manage for simple websites. However,
11+
quick-lint-js' website has enough complex pages that manually maintaining static
12+
HTML files becomes painful. Generated files need to be manually re-generated
13+
when the source changes. Repeated elements such as navigation are error-prone
14+
and time-consuming to write and update.
15+
16+
## Decision
17+
18+
[EJS][]-based template files are checked into the source repository.
19+
20+
Node.js-based software converts the EJS-based template files into HTML. A
21+
dynamic web server exists for developers, and a build script exists for
22+
deployment to GitHub Pages (or any other static file server).
23+
24+
HTML generation logic is written in Node.js as much as possible, and is invoked
25+
from EJS template files.
26+
27+
## Consequences
28+
29+
Contributors and users can no longer see most of the website on their local
30+
machine by just downloading a copy of the source repository. A build step is
31+
needed to convert sources into HTML.
32+
33+
Generated HTML code is always up-to-date because generation is coupled with
34+
deployment.
35+
36+
Code generation scripts are still necessary for man pages and other non-web
37+
output formats.
38+
39+
[EJS]: https://ejs.co/

docs/architecture/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Nygard][ADR-bible].
1717
* [ADR005: Incremental lexing](ADR005-Incremental-lexing.md)
1818
* [ADR006: Location tracking](ADR006-Location-tracking.md)
1919
* [ADR008: Exceptions](ADR010-Exceptions.md)
20+
* [ADR009: Website](ADR009-Website.md)
2021

2122
## Rejected ADRs
2223

0 commit comments

Comments
 (0)