<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Read the Docs Blog - Posts tagged markdown</title>
  <id>https://blog.readthedocs.com/archive/tag/markdown/atom.xml</id>
  <updated>2021-12-20T00:00:00Z</updated>
  <link href="https://blog.readthedocs.com" />
  <link href="https://blog.readthedocs.com/archive/tag/markdown/atom.xml" rel="self" />
  <generator uri="http://ablog.readthedocs.org" version="0.9.5">ABlog</generator>
  <entry xml:base="https://blog.readthedocs.com/archive/tag/markdown/atom.xml">
    <title type="text">Sphinx and Markdown around the world in 2021</title>
    <id>https://blog.readthedocs.com/sphinx-markdown-2021/</id>
    <updated>2021-12-20T00:00:00Z</updated>
    <published>2021-12-20T00:00:00Z</published>
    <link href="https://blog.readthedocs.com/sphinx-markdown-2021/" />
    <author>
      <name>Juan Luis Cano Rodríguez</name>
    </author>
    <content type="html">&lt;div class=&quot;section&quot; id=&quot;sphinx-and-markdown-around-the-world-in-2021&quot;&gt;

&lt;p&gt;Read the Docs has been committed to improving the accessibility
and user experience of Sphinx since the start,
and that includes the markup language in which the documentation is written.
Years ago, after carefully listening to users,
&lt;a class=&quot;reference internal&quot; href=&quot;../../../adding-markdown-support/&quot;&gt;&lt;span class=&quot;doc&quot;&gt;we announced recommonmark&lt;/span&gt;&lt;/a&gt;
to help bridging the immense popularity of Markdown
with the powerful capabilities of Sphinx.
(It is now deprecated in favor of MyST - keep reading to know more.)&lt;/p&gt;
&lt;p&gt;It is no surprise that Markdown is in such demand:
thanks in large part to the huge popularity of GitHub,
&lt;a class=&quot;reference external&quot; href=&quot;https://passo.uno/docs-as-code-tools-open-standards/&quot;&gt;Markdown is nowadays the most widely used markup language in open-source
projects&lt;/a&gt;,
ahead of reStructuredText, the second in the list, by an order of magnitude.&lt;/p&gt;
&lt;p&gt;This year, thanks to the CZI Grant we received last year
and the effort of other communities,
especially &lt;a class=&quot;reference external&quot; href=&quot;https://executablebooks.org&quot;&gt;the Executable Book Project&lt;/a&gt;,
we have devoted lots of resources to help consolidate Markdown
as a compelling markup language for Sphinx.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;writing-markdown-in-sphinx&quot;&gt;
&lt;h2&gt;Writing Markdown in Sphinx&lt;/h2&gt;
&lt;p&gt;To that end, we recognized the potential of MyST as a successor of recommonmark,
and &lt;a class=&quot;reference internal&quot; href=&quot;../../../newsletter-april-2021/&quot;&gt;&lt;span class=&quot;doc&quot;&gt;deprecated the latter in favor of MyST-Parser&lt;/span&gt;&lt;/a&gt;.
To &lt;a class=&quot;reference external&quot; href=&quot;https://www.sphinx-doc.org/en/master/usage/markdown.html&quot; title=&quot;(in Sphinx v5.0.0+)&quot;&gt;&lt;span class=&quot;xref std std-doc&quot;&gt;start writing Markdown in Sphinx&lt;/span&gt;&lt;/a&gt;,
you need to follow three steps:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Install &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;MyST-Parser&lt;/span&gt;&lt;/code&gt;: &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;myst-parser&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;myst_parser&lt;/span&gt;&lt;/code&gt; to the list of Sphinx extensions:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight-python notranslate&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;extensions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# ...other extensions&lt;/span&gt;
&lt;span class=&quot;hll&quot;&gt;    &lt;span class=&quot;s2&quot;&gt;&amp;quot;myst_parser&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Start writing content in &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;*.md&lt;/span&gt;&lt;/code&gt; files!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can find more information in the &lt;a class=&quot;reference external&quot; href=&quot;https://myst-parser.readthedocs.io/en/v0.16.0/index.html&quot; title=&quot;(in MyST Parser v0.16.0)&quot;&gt;&lt;span class=&quot;xref std std-doc&quot;&gt;MyST-Parser documentation&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;talks-and-workshops-at-conferences&quot;&gt;
&lt;h2&gt;Talks and workshops at conferences&lt;/h2&gt;
&lt;p&gt;Luckily the migration to MyST-Parser was trivial for most projects,
but we still wanted to spread the word about
the best practices for creating Sphinx projects on Read the Docs using MyST Markdown.
We set the goal of presenting at every large scientific Python event out there,
and all our proposals were accepted &lt;a class=&quot;footnote-reference&quot; href=&quot;#id2&quot; id=&quot;id1&quot;&gt;[1]&lt;/a&gt;! Throughout 2021, we were present in several events:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;We conducted a networking session and a sprint about documentation
at &lt;a class=&quot;reference external&quot; href=&quot;https://www.scipy2021.scipy.org&quot;&gt;SciPy US&lt;/a&gt;,
and in that event we were kindly invited to
the &lt;a class=&quot;reference external&quot; href=&quot;https://www.eventbrite.com/e/sktime-doc-sprint-tickets-164990684579&quot;&gt;sktime documentation sprint&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;We delivered a 90 minutes tutorial called
&lt;a class=&quot;reference external&quot; href=&quot;https://pydata.org/global2021/schedule/presentation/17/document-your-scientific-project-with-markdown-sphinx-and-read-the-docs/&quot;&gt;“Document your scientific project with Markdown, Sphinx, and Read the
Docs”&lt;/a&gt;
at PyData Global,
and we repeated a 120 minute version in Spanish language
at the &lt;a class=&quot;reference external&quot; href=&quot;https://conf.scipy.lat/en/&quot;&gt;SciPy Latin America&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;And we also gave shorter talks at more broadly focused events:
&lt;a class=&quot;reference external&quot; href=&quot;https://www.pylatam.org/&quot;&gt;PyCon Latam&lt;/a&gt; and &lt;a class=&quot;reference external&quot; href=&quot;https://2021.es.pycon.org/&quot;&gt;PyCon Spain&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We have generated workshop material that everybody is welcome to use:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;A &lt;a class=&quot;reference external&quot; href=&quot;https://github.com/readthedocs/tutorial-sphinx-markdown&quot;&gt;main repository&lt;/a&gt;
containing some introductory slides about Sphinx,
and detailed notes of every step of the tutorial.&lt;/li&gt;
&lt;li&gt;A &lt;a class=&quot;reference external&quot; href=&quot;https://github.com/readthedocs/tutorial-sphinx-markdown-library/&quot;&gt;supporting repository&lt;/a&gt;
with a tiny Python library that gets used during the tutorial,
inspired by the one used in the &lt;a class=&quot;reference external&quot; href=&quot;https://www.sphinx-doc.org/en/master/tutorial/index.html&quot; title=&quot;(in Sphinx v5.0.0+)&quot;&gt;&lt;span class=&quot;xref std std-doc&quot;&gt;official Sphinx tutorial&lt;/span&gt;&lt;/a&gt;
we authored with the help of the Sphinx community.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And finally, we have also developed an interactive web application to
&lt;a class=&quot;reference external&quot; href=&quot;https://mystyc.herokuapp.com/&quot;&gt;translate small bits of reStructuredText to MyST Markdown&lt;/a&gt;.&lt;/p&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id2&quot; rules=&quot;none&quot;&gt;
&lt;colgroup&gt;&lt;col class=&quot;label&quot; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;#id1&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;We also have submitted a proposal for SciPy India,
which was postponed to January 2022.
EuroSciPy and SciPy Japan didn’t happen in 2021.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;future-plans&quot;&gt;
&lt;h2&gt;Future plans&lt;/h2&gt;
&lt;p&gt;We are excited to see that the Executable Books team
has released &lt;a class=&quot;reference external&quot; href=&quot;https://pypi.org/project/myst-docutils/&quot;&gt;myst-docutils&lt;/a&gt;,
which should help docutils parse CommonMark directly
and possibly pave the way for Sphinx to parse Markdown
without the need of third party extensions.
Hopefully that will also make it easier for Sphinx
to showcase Markdown content in its documentation more prominently,
and users will be able to naturally pick the markup language
that best suits their needs, be it reST or MyST.&lt;/p&gt;
&lt;p&gt;—&lt;/p&gt;
&lt;p&gt;Considering using Read the Docs for your next Sphinx, Jupyter Book, or MkDocs project?
Check out &lt;a class=&quot;reference external&quot; href=&quot;https://docs.readthedocs.io/&quot;&gt;our documentation&lt;/a&gt; to get started!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://blog.readthedocs.com/archive/tag/markdown/atom.xml">
    <title type="text">Read the Docs &amp; Sphinx now support Commonmark</title>
    <id>https://blog.readthedocs.com/adding-markdown-support/</id>
    <updated>2015-10-16T00:00:00Z</updated>
    <published>2015-10-16T00:00:00Z</published>
    <link href="https://blog.readthedocs.com/adding-markdown-support/" />
    <author>
      <name>Eric Holscher</name>
    </author>
    <content type="html">&lt;div class=&quot;section&quot; id=&quot;read-the-docs-sphinx-now-support-commonmark&quot;&gt;

&lt;p&gt;Read the Docs is built on top of Sphinx,
which has always relied on reStructuredText as an input mechanism.
We have long heard from folks that they want to write documentation in Markdown,
as well as RST.&lt;/p&gt;
&lt;p&gt;Today we are announcing that this is now possible!
With the standardization of Markdown into &lt;a class=&quot;reference external&quot; href=&quot;https://commonmark.org/&quot;&gt;Commonmark&lt;/a&gt;,
we have the ability to support a markup language with a proper spec.
&lt;a class=&quot;reference external&quot; href=&quot;https://github.com/rtfd/recommonmark&quot;&gt;recommonmark&lt;/a&gt; is the bridge that allows Commonmark to be used inside Sphinx.
&lt;strong&gt;This allows you to use both RST and Commonmark inside of your Sphinx project.&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;get-started&quot;&gt;
&lt;h2&gt;Get started&lt;/h2&gt;
&lt;p&gt;We have documented how to &lt;a class=&quot;reference external&quot; href=&quot;https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html#using-markdown-with-sphinx&quot; title=&quot;(in Read the Docs user documentation v7.4.1)&quot;&gt;&lt;span class=&quot;xref std std-ref&quot;&gt;get started&lt;/span&gt;&lt;/a&gt; with Commonmark inside of Sphinx.
You simply:&lt;/p&gt;
&lt;div class=&quot;highlight-default notranslate&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;recommonmark&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then in your &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;conf.py&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight-python notranslate&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;recommonmark.parser&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CommonMarkParser&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;source_parsers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;.md&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CommonMarkParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;source_suffix&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;.rst&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;.md&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This allows you to write both &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.md&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;.rst&lt;/span&gt;&lt;/code&gt; files inside of the same project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;example-project&quot;&gt;
&lt;h2&gt;Example Project&lt;/h2&gt;
&lt;p&gt;You can see this in action in my &lt;a class=&quot;reference external&quot; href=&quot;https://github.com/ericholscher/sphinx-markdown-test&quot;&gt;sphinx-markdown-test repo&lt;/a&gt; on GitHub.
You can also see a &lt;a class=&quot;reference external&quot; href=&quot;https://sphinx-markdown-test.readthedocs.org/en/latest/&quot;&gt;rendered version&lt;/a&gt; hosted on Read the Docs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;how-it-works&quot;&gt;
&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;The way this project works is that it allows Commonmark files to be parsed into &lt;a class=&quot;reference external&quot; href=&quot;http://docutils.sourceforge.net/docs/ref/doctree.html&quot;&gt;docutils nodes&lt;/a&gt;.
That means that everything downstream of the parser works the same as if the content came from RST.
This allows the content to slot into Sphinx and other RST based tools without much effort.&lt;/p&gt;
&lt;p&gt;There are some caveats where certain Sphinx &amp;amp; docutils directives depend on the internal structure of RST.
We would like to eventually build a bridge from Commonmark to the Sphinx directives,
which would give a lot of the power of Sphinx to the Commonmark content.&lt;/p&gt;
&lt;p&gt;We are looking at ways to handle this in the future,
and hope to eventually bring the full power of RST and Sphinx into the Commonmark ecosystem.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;limitations&quot;&gt;
&lt;h2&gt;Limitations&lt;/h2&gt;
&lt;p&gt;It should be noted that Commonmark doesn’t support a lot of the concepts that RST lets you represent.
In particular,
there is no standardized way in Commonmark to represent inline or block levels constructs.
So things like the &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;toctree&lt;/span&gt;&lt;/code&gt; directive and &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;:ref:&lt;/span&gt;&lt;/code&gt; markup don’t have an analog.&lt;/p&gt;
&lt;p&gt;There is a &lt;a class=&quot;reference external&quot; href=&quot;http://talk.commonmark.org/t/generic-directives-plugins-syntax/444&quot;&gt;proposed draft&lt;/a&gt; to the Commonmark spec to allow a similar syntax.
We are investigating adding support to this in recommonmark,
but we don’t want to implement a standard prematurely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;intended-usage&quot;&gt;
&lt;h2&gt;Intended Usage&lt;/h2&gt;
&lt;p&gt;We think that Sphinx’s power to reference code and other programming concepts is quite powerful.
However,
all content doesn’t need this ability.
When you’re writing content that just needs to have basic text formatting and links,
Commonmark is a great option for this.&lt;/p&gt;
&lt;p&gt;We imagine that API reference documentation will continue to be authored in RST for quite some time.
Also index pages and other reference heavy content will continue to be RST.
FAQ’s, blog posts, and other less reference heavy content is a great candidate for writing in Commonmark.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;feedback&quot;&gt;
&lt;h2&gt;Feedback&lt;/h2&gt;
&lt;p&gt;This is a new release,
so there are likely some missing pieces to our integration.
Go ahead and try it out.
Please file features ideas and bug reports on the &lt;a class=&quot;reference external&quot; href=&quot;https://github.com/rtfd/recommonmark/issues&quot;&gt;recommonmark bug tracker&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
  </entry>
</feed>
