diff --git a/CHANGELOG.md b/CHANGELOG.md index aa16f82c..94293fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,111 @@ # Changelog +## 0.19.0 - 2023-03-01 + +This release brings a number of exciting new features, improvements, and upgrades 🎉 + +Full Changelog: [v0.18.1...v0.19.0](https://github.com/executablebooks/MyST-Parser/compare/v0.18.1...v0.19.0) + +### 📚 Rewritten documentation + +The documentation has been almost completely rewritten, +with a clearer structure, many more examples, rich hover tips, and a new live preview page ⚡️ (powered by [pyscript](https://pyscript.readthedocs.io/), ). + +The code base API is also now fully documented by [sphinx-autodoc2](https://sphinx-autodoc2.readthedocs.io/), which even allows for MyST docstrings! (). + +### ⬆️ Add Sphinx 6 support, drop Sphinx 4 + +The code base has been updated to support sphinx v6, and is no longer tested against sphinx v4 () + +### 📄 Extended docutils (single-page) support + +The `docutils` parser now supports many more features, and improvements to support live previews: + +- `myst_suppress_warnings` option added, mirroring Sphinx, to suppress MyST warnings () +- `myst_meta_html` and `myst_substitutions` options are now supported () +- `myst_heading_anchors` option is now supported () +- Math block labels syntax is now supported () +- Missing directive/role errors errors are now suppressable warnings () +- Non-fatal directive parsing errors are now suppressable warnings () +- Most of the extended markdown syntax below is also supported + +### 🔗 Extended Markdown links + +See the [Extended Markdown links](docs/syntax/cross-referencing.md) section for the full guide. + +You can now use standard Markdown link syntax to reference many different types of targets, in a more consistent way. + +- `[text](relative/path/myfile.md)` work as previously, to link to files, + but they can also be relative to source directory: `[text](/path/from/srcdir/myfile.md)`. + You can also use `` +- `` will link specifically to a downloadable file +- `[text](#target)` or `` will link (in order of priority) to any local target, local heading anchor, target in the same project, or intersphinx (inventory) target +- `[text](inv:name:domain:type#target)` will link specifically to a Sphinx inventory target, or to any inventory ``, and can even use `*` wildcards like `` + - This can even be used in docutils, with the new `myst_inventories` config option + - The `myst-inv` CLI makes it easy to find the correct inventory target + +:::{tip} +It is advised (although not immediately necessary) to prefix all internal references with `#`. +For example, `[...](my-reference)`, should be changed to `[...](#my-reference)`. +::: + +### `{}` Attributes syntax + +The [`attrs_inline` and `attrs_block`](docs/syntax/optional.md#attributes) extensions allow for common Markdown syntaxes to be extended with greater control over the output. + +For example, you can now add classes, ids, and other attributes to inline code, images, and links, as well as to code blocks and directives. + +- Inline code: `` `a = 1`{#id .class l=python} `` +- Images: `![image](image.png){#id .class width=100px}` +- Text spans: `[some text]{#id .class}` + +A paragraph block can have attributes too: + +```markdown +{#id .class} +This is a paragraph with an id and class +``` + +A code fence can be given line numbers and line emphasis: + +````markdown +{#id .class lineno-start=1 emphasize-lines="2,3"} +```python +a = 1 +b = 2 +c = 3 +``` +```` + +A definition list can be turned into a glossary, with referenceable terms: + +```markdown +{.glossary} +term name +: Definition of the term +``` + +Quote blocks can be given an attribution: + +```markdown +{attribution="Chris Sewell"} +> My quote +``` + +### 👌 Miscellaneous improvements + +- Nested headings (e.g. inside directives) are now allowed in MyST and are correctly rendered in HTML () +- The `colon_fence` extension now renders internal content as MyST, rather than as a code block () +- The `include` directive in MyST documents now supports a `:heading-offset:` option, to offset the heading levels in the included document +- The `myst_heading_slug_func` option now supports setting a `str` which points to a fully qualified function name, e.g. `"module.path.func"` () +- The `myst_enable_checkboxes` option allows for task list checkboxes to be enabled/disabled () + +### Additional contributions + +- 🐛 FIX: Remove unnecessary assert in , thanks to +- 🔧 ci(deps): setup dependabot (), thanks to +- 🔧: Depend on typing_extensions only on `Python<3.8` in , thanks to + ## 0.18.1 - 2022-27-09 Full Changelog: [v0.18.0...v0.18.1](https://github.com/executablebooks/MyST-Parser/compare/v0.18.0...v0.18.1) diff --git a/docs/conf.py b/docs/conf.py index 4e94485e..26330177 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -159,6 +159,7 @@ "use_repository_button": True, "use_edit_page_button": True, "use_issues_button": True, + "announcement": "

v0.19 is now out! See the Changelog for details

", } # OpenGraph metadata ogp_site_url = "https://myst-parser.readthedocs.io/en/latest" diff --git a/myst_parser/__init__.py b/myst_parser/__init__.py index b415e2d4..ef35016c 100644 --- a/myst_parser/__init__.py +++ b/myst_parser/__init__.py @@ -2,7 +2,7 @@ with bridges to [docutils](https://docutils.sourceforge.io/) and [Sphinx](https://github.com/sphinx-doc/sphinx). """ -__version__ = "0.18.1" +__version__ = "0.19.0" def setup(app):