Skip to content

Commit 012cf86

Browse files
JD557julienrf
authored andcommitted
Add a mention to the provided Liquid variables
I think it's a bit odd that the documentation specifies "[...] several custom filters and tags specific to Scala[...]" and then doesn't mention anything about that. From what I can tell from the [source code](https://github.com/lampepfl/dotty/blob/0632405ae487233709c9c6af6d83ff03db7f7bce/scaladoc/src/dotty/tools/scaladoc/site/StaticSiteContext.scala#L113-L115), the only Scala specific things being provided are the `projectTitle` and `projectVersion`. I think it's useful to document the existence of this variables. Especially `projectVersion`, which can be used to automatically generate `sbt`/`mill`/`maven`/... coordinates.
1 parent 5fa024b commit 012cf86

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_overviews/scala3-scaladoc/static-site.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ Scaladoc uses the [Liquid](https://shopify.github.io/liquid/) templating engine
7070
and provides several custom filters and tags specific to Scala
7171
documentation.
7272

73+
The following project related variables are available and can be accessed using
74+
double curly braces (e.g. `{{ projectTitle }}`):
75+
76+
- **projectTitle** the project title defined with the `-project` flag.
77+
- **projectVersion** the project version defined with the `-project-version` flag.
78+
7379
In Scaladoc, all templates can contain YAML front-matter. The front-matter
7480
is parsed and put into the `page` variable available in templates via Liquid.
7581

0 commit comments

Comments
 (0)