Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/jira-base-url.md

This file was deleted.

37 changes: 0 additions & 37 deletions .changeset/skip-non-language-dirs.md

This file was deleted.

57 changes: 57 additions & 0 deletions packages/doom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# @alauda/doom

## 2.9.0

### Minor Changes

- [#364](https://github.com/alauda/doom/pull/364) [`d02c46f`](https://github.com/alauda/doom/commit/d02c46f3bdaf79860fcc798f5ba56353f989634b) Thanks [@youyongsong](https://github.com/youyongsong)! - Make the Jira that release notes are fetched from configurable, with `JIRA_BASE_URL`.

A `release-notes-for-bugs` placeholder is filled from Jira's search API, and the
address of that API was written into the code — `https://jira.alauda.cn/rest/api/2/search`
— while only the credentials, `JIRA_USERNAME` and `JIRA_PASSWORD`, came from the
environment. A build that can reach Jira only through another host or port had no
way to say so, and a production build fails when it cannot fetch its release notes.

`JIRA_BASE_URL` is the Jira base URL: the scheme, the host, an optional port and an
optional context path, without `/rest/...`. doom appends `/rest/api/2/search` to it.
A trailing `/` is ignored, and an empty value counts as unset, which is the shape an
unset variable often arrives in. It is read for each request rather than when the
module loads, so it does not matter when the plugin was first imported.

Unset, the request is byte for byte the one doom sent before, so nothing changes for
a build that does not set it.

### Patch Changes

- [#365](https://github.com/alauda/doom/pull/365) [`26b6b4f`](https://github.com/alauda/doom/commit/26b6b4f41902ac9714aa941b6f0c567637949b0f) Thanks [@youyongsong](https://github.com/youyongsong)! - Only a supported language's directory is a language. Any other directory under
the docs root is now skipped with a warning instead of failing the build.

Every directory directly under the docs root used to become a language, apart
from `dist`, `node_modules`, `public` and `shared`. Each language gets a
`/<lang>/products` page whose heading comes from doom's word list, and the word
list only has `en`, `zh` and `ru`. So when `tektoncd-operator` added a shell
script under `docs/scripts/`, `scripts` became a language, and every docs build
of both its branches failed from then on (65 runs over two days, none green)
with an error that says nothing about the directory:

```text
Page "/scripts/products" SSG rendering failed.
TypeError: Cannot read properties of undefined (reading 'all_product_documentation')
```

Nor could a site work around it: there is no option to name the languages, and
a `themeConfig.locales` list in the config is appended to the detected one
rather than replacing it.

A directory is now a language only if its name is one of
`SUPPORTED_LANGUAGES`, the list `doom lint` and `doom translate` already use.
Any other directory is left out of the site the way `shared/` is — none of its
files becomes a page — and the build says which one it skipped:

```text
Skipped `docs/scripts`: not a language directory (doom builds en, zh, ru), so no pages are built from it, like `shared`
```

`-I` / `-E` still pick the languages first; a directory they leave out is
skipped silently, as before. The same rule covers a directory of pages in a
language doom does not support, such as `docs/ja/`: its pages are not built, and
the warning is the only sign of it.

## 2.8.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/doom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alauda/doom",
"version": "2.8.2",
"version": "2.9.0",
"type": "module",
"description": "Doctor Doom making docs.",
"repository": {
Expand Down
Loading