Skip to content

Commit 6222ed0

Browse files
committed
Revisions to release notes
1 parent 8ba7ce5 commit 6222ed0

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

releasenotes.md

+40-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Dactyl v0.10.0 contains two significant breaking changes: a new header ID formul
88

99
### Header ID Formula
1010

11-
The default formula for header IDs has changed slightly. In cases where your content links to anchors by the header's ID, you may need to update your links to use the header's ID under the new formula.
11+
The default formula for header IDs has changed slightly. Most headers in English documents have the same IDs as before, but headers may have different IDs in certain edge cases, especially for headers with non-English text. In cases where your content contains an anchor link to a header whose ID has changed, you must update your links to use the header's ID under the new formula.
1212

1313
The new formula more closely matches GitHub's formula for header IDs. In particular:
1414

@@ -26,16 +26,16 @@ The `xrefs` filter now raises an error if you link to a page without providing l
2626

2727
Previously the filter would silently provide link text based on other attributes of the page, such as its markdown filename. This is usually not what you want the final output to have.
2828

29-
To continue building despite these types of errors, pass `--bypass_errors` when running `dactyl_build`. Preferably, fix the xrefs so the referenced pages can have
29+
To continue building despite these types of errors, pass `--bypass_errors` when running `dactyl_build`. Preferably, fix the xrefs so the referenced pages have proper names.
3030

3131

3232
## New Features
3333

3434
### Frontmatter Improvements
3535

36-
Dactyl improves the handling of Jekyll-style frontmatter as introduced in v0.9.0. Frontmatter is metadata at the start of a Markdown file, surrounded by a pair of `---` lines. Now you can provide any of a page's fields in the frontmatter instead of in the Dactyl config file, except for the path to the file itself.
36+
Dactyl v0.10.0 improves the handling of Jekyll-style frontmatter. Frontmatter is metadata at the start of a Markdown file, surrounded by a pair of `---` lines. Now you can provide any of a page's fields in the frontmatter instead of in the Dactyl config file, except for the path to the file itself.
3737

38-
In cases where the config file and the frontmatter specify the same fields for a given file, the config file takes precedence.
38+
In cases where the config file and the frontmatter specify conflicting values for a field, the config file takes precedence.
3939

4040
Example of a page with frontmatter:
4141

@@ -66,7 +66,31 @@ Managing a hierarchy of documents is a common problem, so the new version of Dac
6666
6767
Add the **`parent` field** to a page's metadata to define a "parent" for the current page. The value of the `parent` field should be **the exact value of the parent page's `html` field.** If a page doesn't have an explicitly-specified `html` value, you must use the automatically generated value for the parent.
6868

69-
As a best practice, set all your "first level" pages to have your `cover_page` as their parent.
69+
Example:
70+
71+
```yaml
72+
- md: some-parent-page.md
73+
html: parent.html
74+
75+
- md: first-child-page.md
76+
html: child1.html
77+
parent: parent.html
78+
79+
- md: grandchild.md
80+
html: grandchild.html
81+
parent: child1.html
82+
83+
- md: child2.md
84+
html: child2.html
85+
parent: parent.html
86+
```
87+
88+
This creates a conceptual hierarchy like this:
89+
90+
- `parent.html`
91+
- `child1.html`
92+
- `grandchild.html`
93+
- `child2.html`
7094

7195
After loading pages, Dactyl provides the following additional fields in each page's metadata, which are available to the preprocessor, filters, and templates:
7296

@@ -75,19 +99,20 @@ After loading pages, Dactyl provides the following additional fields in each pag
7599
| `children` | List | A list of pages that claim this page as a parent. Each page in the list is provided as a reference, so you can read its metadata including following its own children. |
76100
| `is_ancestor_of` | Function | A function you can use to check whether a given page is the direct or indirect parent of another given page. Provide the exact `html` of the page you want to check for as the single argument to this function. |
77101

78-
Dactyl does not enforce a strict tree-like hierarchy of parents/children. It is up to the templates to use these fields to provide appropriate navigation elements based on the hierarchy these fields represent. [Example of template for printing page hierarchy tree.](https://github.com/mDuo13/dactyl-starter-kit/blob/master/template/template-tree-nav.html)
102+
This conceptual hierarchy does not affect the paths where output files are written. (It would be sensible to choose output `html` paths to reflect this hierarchy, though.) Also, Dactyl does not enforce a strict tree-like hierarchy of parents/children. It is up to the templates to use these fields to provide appropriate navigation elements based on the hierarchy these fields represent. [Example of template for printing page hierarchy tree.](https://github.com/mDuo13/dactyl-starter-kit/blob/master/template/template-tree-nav.html)
79103

80104
**Caution:** It is possible to create infinite loops. Do not make a page its own direct or indirect parent. Doing so is likely to result in a `RecursionError` when trying to build.
81105

106+
82107
### Other New Fields
83108

84-
In addition to the new page fields added for page hierarchy, Dactyl now provides certain fields to every page based on the results of parsing that page. (Previously, Dactyl only provided these fields when building ElasticSearch JSON formats.) Now, Dactyl provides those fields to every page after parsing that page's content Markdown. The fields are:
109+
In addition to the new page fields added for page hierarchy, Dactyl now provides certain fields to every page based on the results of parsing that page. Previously, Dactyl only provided these fields when building ElasticSearch JSON formats. Now, Dactyl provides these fields to every page after parsing that page's content Markdown. These fields are:
85110

86111
| Field | Value | Description |
87112
|:------------|:-----------|:--------------------------------------------------|
88113
| `blurb` | String | An excerpt from the start of the page, if available, generally consisting of the first paragraph of body text. |
89114
| `plaintext` | String | The entire body text of the page, stripped of any formatting. |
90-
| `headermap` | Dictionary | A mapping of header text to those headers' unique IDs. |
115+
| `headermap` | Dictionary | A mapping, where the keys are the headers' plain text (formatting removed) and the values are those headers' unique IDs. |
91116

92117
Because these fields are derived from the content's HTML output, they are **not available** to the preprocessor, nor in filter functions `filter_markdown()` or `filter_html()`. They **are available** to `filter_soup()` functions and when rendering HTML templates.
93118

@@ -97,7 +122,7 @@ If a page already has a `blurb` field defined in its metadata, Dactyl leaves the
97122

98123
Dactyl already provided templates with a string containing the HTML for a list of header-based anchors in the current page, in the `page_toc` variable. (This variable, and its legacy alias `sidebar_content`, continue to be available.) However, to provide an opportunity to customize the markup of how the in-page anchors are presented, Dactyl now also provides a `headers` field, which you can use to generate a more customized table of contents. (For example, if you are using Bootstrap, you can use this to provide the classes necessary to make Scrollspy work properly.)
99124

100-
The `headers` field is a **list of headers** in the document, derived from `<h1>` through `<h6>` elements. Each header is a dictionary with the following fields:
125+
The `headers` field is a **list of headers** in the document, derived from `<h1>` through `<h6>` elements. **Each header** in the list is a dictionary with the following fields:
101126

102127
| Field | Value | Description |
103128
|:--------|:--------|:---------------------------------------------------------|
@@ -164,14 +189,16 @@ In future releases, Dactyl may use the `prefix` field for more conveniences arou
164189

165190
### Internationalization Improvements
166191

167-
Dactyl now supports `{% trans %}Text to be translated {% endtrans %}` syntax in templates.
192+
Dactyl now supports `{% trans %}Text to be translated{% endtrans %}` syntax in templates.
168193

169-
Support for locale files is ***experimental*** and the details are likely to change in a future version of Dactyl. To use translated values for these strings, add the following field to a **target definition**:
194+
To use translated values for these strings, add the following field to a **target definition**:
170195

171196
| Field | Value | Description |
172197
|:--------------|:-------|:----------------------------------------------------|
173198
| `locale_file` | String | Path to a (binary) `.mo` file containing translated strings for this target's locale/language. |
174199

200+
Support for locale files is ***experimental*** and the details are likely to change in a future version of Dactyl.
201+
175202
You can use [Babel](http://babel.pocoo.org/) to extract strings from templates and to compile the translations into a `.mo` file. For an example, see <https://github.com/mDuo13/dactyl-starter-kit/blob/master/locale/README.md>.
176203

177204

@@ -187,8 +214,8 @@ However, OpenAPI spec parsing should still be considered experimental.
187214

188215
## Bug Fixes and Other Cleanup
189216

190-
- `--skip_preprocessor` (when using a config file) again. It has been broken since v0.40.0.
217+
- `--skip_preprocessor` (when using a config file) works again. It had been broken since v0.40.0.
191218
- `--bypass_errors` can now bypass errors that occurred when running a filter.
192-
- Removed some extraneous whitespace in the default tables of contents ("In this page" area).
219+
- Removed some extraneous whitespace in the default tables of contents `{{page_toc}}`.
193220
- Improved the clarity of log messages.
194221
- New unit tests.

0 commit comments

Comments
 (0)