question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

myst-docutils-html doesn't appear to accept the myst configuration parameters or directives

See original GitHub issue

Describe the bug

context When I do myst-docutils-html --myst-enable-extensions="html-image,colon-fence" test.md test.html

expectation I expected the HTML file to be created without any errors.

bug But instead I get an error

myst-docutils-html --myst-enable-extensions="html-image,colon-fence" test.md test.html
test.md:: (ERROR/3) myst configuration invalid: myst_enable_extensions not recognised: {'colon-fence', 'html-image'}
test.md:38: (ERROR/3) Unknown directive type "seealso".

test.md:27: (ERROR/3) Unknown target name: "../solution_components/platform-tcp.md".
test.md:30: (ERROR/3) Unknown target name: "#21-use-cases".

The original test.md file is:

# Reference Architecture for Infrastructure Orchestration <!-- omit in toc -->

**Document Control**:

:::{image} ../artefacts/status-wip.svg
:width: 20%
:name: status is work in progress
:align: left
:alt: status is work in progress
:::

||Document Owners|
|---|---|
|||
|||

## 2. Requirements & Use-Cases

Some text

### 2.1. Use Cases

Some text

#### 2.1.1. UC1

A blueprint for this technology stack can be found [here](../solution_components/platform-tcp.md).


However, as described in the [Use-Cases above](#21-use-cases), this architecture and the components included within need to support hardware lifecycle management for both virtualisation platforms and bare metal operating systems.

## 3. Security

Some text

### 3.3. Security Considerations

```{seealso}

Global Cyber Security Policies and Detailed Requirements must be reviewed and taken into account when creating any Solution Component or Solution Blueprints.

```

This is a problem as it appears that the MyST directives aren’t accepted by this utility, and the command line options don’t accept valid MyST extensions.

Reproduce the bug

test.md containing:

# Reference Architecture for Infrastructure Orchestration <!-- omit in toc -->

**Document Control**:

:::{image} ../artefacts/status-wip.svg
:width: 20%
:name: status is work in progress
:align: left
:alt: status is work in progress
:::

||Document Owners|
|---|---|
|||
|||

## 2. Requirements & Use-Cases

Some text

### 2.1. Use Cases

Some text

#### 2.1.1. UC1

A blueprint for this technology stack can be found [here](../solution_components/platform-tcp.md).


However, as described in the [Use-Cases above](#21-use-cases), this architecture and the components included within need to support hardware lifecycle management for both virtualisation platforms and bare metal operating systems.

## 3. Security

Some text

### 3.3. Security Considerations

```{seealso}

Global Cyber Security Policies and Detailed Requirements must be reviewed and taken into account when creating any Solution Component or Solution Blueprints.

```

Then run the following command: myst-docutils-html --myst-enable-extensions="html-image,colon-fence" test.md test.html

List your environment

Python 3.10.1 Windows 10

I am using a virtual environment and have the following packages installed: Package Version


alabaster 0.7.12 attrs 21.4.0 Babel 2.9.1 certifi 2021.10.8 charset-normalizer 2.0.12 colorama 0.4.4 docutils 0.17.1 idna 3.3 imagesize 1.3.0 Jinja2 3.0.3 markdown-it-py 2.0.1 MarkupSafe 2.1.0 mdit-py-plugins 0.3.0 mdurl 0.1.0 myst-parser 0.17.0 packaging 21.3 pip 21.2.4 Pygments 2.11.2 pyparsing 3.0.7 pytz 2021.3 PyYAML 6.0 requests 2.27.1 setuptools 58.1.0 snowballstemmer 2.2.0 Sphinx 4.4.0 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 typing_extensions 4.1.1 urllib3 1.26.8

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Mar 3, 2022

Hey, @tomkivlin there are two things to note here:

  1. It should be "html_image,colon_fence", i.e. _ not -
  2. The seealso directive is sphinx only, i.e. it is not supported by docutils and so cannot be parsed by myst-docutils
0reactions
tomkivlincommented, Mar 4, 2022

so am I right in thinking the admonitions listed here are ok to use with both MyST in sphinx and with myst-docutils?

yep 👍

Many thanks - am closing the issue as modifying the admonition and using the following command works: myst-docutils-html --myst-enable-extensions="html_image,colon_fence" --myst-all-links-external="yes" test.md test.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Single Page Builds - MyST-Parser - Read the Docs
On installing MyST-Parser, the following CLI-commands are made available: myst-docutils-html : converts MyST to HTML.
Read more >
A deep dive into MyST, Part 2: The MyST-Parser, Docutils and ...
The MarkdownIt class is instantiated with some parsing configuration options, dictating the syntax rules and additional options for the parser ...
Read more >
MyST-Parser/CHANGELOG.md at master
MyST now allows for Docutils-only use (outside of Sphinx), that allows for MyST configuration options to be set via the docutils.conf file, or...
Read more >
Docutils Configuration - SourceForge
Configuration files are used for persistent customization; they can be set once and take effect every time you use a component, e.g., via...
Read more >
Directives — Sphinx documentation
This defaults to python but can be configured using the highlight_language config value. The following values are supported: none (no highlighting). default ( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found