<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kAZUYA tAKEI</title>
    <description>The latest articles on DEV Community by kAZUYA tAKEI (@attakei).</description>
    <link>https://dev.to/attakei</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F41342%2F6aa46c38-ab4d-45ae-8f7e-4f35cfa81117.jpg</url>
      <title>DEV Community: kAZUYA tAKEI</title>
      <link>https://dev.to/attakei</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/attakei"/>
    <language>en</language>
    <item>
      <title>Render "GFM"-likely HTML in Sphinx with MyST-Parser</title>
      <dc:creator>kAZUYA tAKEI</dc:creator>
      <pubDate>Sun, 11 May 2025 18:37:07 +0000</pubDate>
      <link>https://dev.to/attakei/render-gfm-likely-html-in-sphinx-with-myst-parser-2h6k</link>
      <guid>https://dev.to/attakei/render-gfm-likely-html-in-sphinx-with-myst-parser-2h6k</guid>
      <description>&lt;p&gt;&lt;a href="https://pypi.org/project/myst-parser/" rel="noopener noreferrer"&gt;MyST-Parser&lt;/a&gt; is Sphinx extension to parse Markdown document sources.&lt;br&gt;
We can write high structured document using it even if we don't know syntax reStructuredText.&lt;/p&gt;
&lt;h2&gt;
  
  
  MyST-Parser supports GFM, but ...
&lt;/h2&gt;

&lt;p&gt;MyST-Parser has some options for behavior. &lt;sup id="fnref1"&gt;1&lt;/sup&gt;&lt;br&gt;
There is &lt;code&gt;myst_gfm_only&lt;/code&gt; in options. This is to run parse GitHub Flavored Markdown (GFM) that support some extended syntax from Commonmark.&lt;/p&gt;

&lt;p&gt;But, when this option is &lt;code&gt;True&lt;/code&gt;, it does not inject &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; into linefeed of sources.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This markdown source has line feed each sentence.&lt;/p&gt;

&lt;p&gt;When Sphinx converts it to HTML by sphinx-build.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But GitHub render from this source. &lt;sup id="fnref2"&gt;2&lt;/sup&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
&amp;lt;br /&amp;gt;
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
&amp;lt;br /&amp;gt;
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
&amp;lt;br /&amp;gt;
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why it happened?&lt;/p&gt;

&lt;h2&gt;
  
  
  GFM is not matched between spec and behavior.
&lt;/h2&gt;

&lt;p&gt;GFM spec is put on &lt;a href="https://github.github.com/gfm/" rel="noopener noreferrer"&gt;https://github.github.com/gfm/&lt;/a&gt;.&lt;br&gt;
There are &lt;a href="https://github.github.com/gfm/#hard-line-breaks" rel="noopener noreferrer"&gt;"6.12Hard line breaks&lt;br&gt;
"&lt;/a&gt; and &lt;a href="https://github.github.com/gfm/#soft-line-breaks" rel="noopener noreferrer"&gt;"6.13 Soft line breaks"&lt;/a&gt; about spec of line breaks.&lt;/p&gt;

&lt;p&gt;Spec of soft line break:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A regular line break (not in a code span or HTML tag) that is not preceded by two or more spaces or a backslash is parsed as a softbreak. (A softbreak may be rendered in HTML either as a line ending or as a space. The result will be the same in browsers. In the examples here, a line ending will be used.)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We expect that it renders nothing when there are soft line breaks.&lt;br&gt;
But actually, GitHub.com renders &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag from line feed.&lt;/p&gt;

&lt;p&gt;MyST-Parser doesn't have options for line breaks.&lt;/p&gt;

&lt;p&gt;It is difficult that to adjust for implementation of GitHub?&lt;br&gt;
No, you can resolve it by hack class definition.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to hack for realize "actual" GFM style line breaks.
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Code
&lt;/h3&gt;

&lt;p&gt;Please write it code into &lt;code&gt;conf.py&lt;/code&gt; of your document.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# If you already defined setup, write these code into before `return`. 
&lt;/span&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;myst_parser.mdit_to_docutils.base&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DocutilsRenderer&lt;/span&gt;

    &lt;span class="n"&gt;DocutilsRenderer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;render_softbreak&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DocutilsRenderer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;render_hardbreak&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;When Sphinx with MyST-Parser convert from Markdown to HTML, generates intermediate object called "doctree".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MyST-Parser parse Markdown and create doctree.&lt;/li&gt;
&lt;li&gt;Writer process of Sphinx generates HTML from doctree.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To create doctree from Markdown, MyST-Parser defines &lt;a href="https://github.com/executablebooks/MyST-Parser/blob/master/myst_parser/mdit_to_docutils/base.py#L88" rel="noopener noreferrer"&gt;DoctreeRenderer&lt;/a&gt;.&lt;br&gt;
This class have methods that works each AST nodes of Markdown.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DocutilsRenderer.render_softbreak&lt;/code&gt; is method to put linefeed code when process visits "soft line breaks".&lt;br&gt;
&lt;code&gt;DocutilsRenderer.render_hardbreak&lt;/code&gt; is method to put HTML when process visits "hard line breaks".&lt;/p&gt;

&lt;p&gt;In Python, we can override methods of classes by reassign.&lt;br&gt;
Resolve code is to override &lt;code&gt;render_softbreak&lt;/code&gt; by &lt;code&gt;render_hardbreak&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Therefore, when parser found all line breaks, it runs as "hard line breaks". &lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://myst-parser.readthedocs.io/en/latest/configuration.html" rel="noopener noreferrer"&gt;https://myst-parser.readthedocs.io/en/latest/configuration.html&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;Actually, &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag puts on single line, it added tail of lines. ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>sphinx</category>
      <category>markdown</category>
      <category>github</category>
      <category>python</category>
    </item>
    <item>
      <title>Hosting presentation on Read the Docs</title>
      <dc:creator>kAZUYA tAKEI</dc:creator>
      <pubDate>Sat, 19 Oct 2024 06:36:25 +0000</pubDate>
      <link>https://dev.to/attakei/hosting-presentation-on-read-the-docs-3lkc</link>
      <guid>https://dev.to/attakei/hosting-presentation-on-read-the-docs-3lkc</guid>
      <description>&lt;p&gt;This is updates of &lt;a href="https://dev.to/attakei/a-short-hack-to-deploy-revealjs-presentation-on-read-the-docs-292b"&gt;previous post&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  About Read the Docs
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://about.readthedocs.com/" rel="noopener noreferrer"&gt;Read the Docs&lt;/a&gt;(RTD) is "documentation platform" to host website about document of software.&lt;br&gt;
RTD can integrate with GitHub. If integrated repository has &lt;code&gt;.readthedocs.yaml&lt;/code&gt;, build sources and deploy contents when it is pushed.&lt;/p&gt;
&lt;h2&gt;
  
  
  Example of &lt;code&gt;.readthedocs.yaml&lt;/code&gt; for standard Sphinx:
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;

&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;os&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ubuntu-22.04'&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;python&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.11'&lt;/span&gt;

&lt;span class="na"&gt;sphinx&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;configuration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docs/conf.py&lt;/span&gt;
  &lt;span class="na"&gt;builder&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dirhtml&lt;/span&gt;

&lt;span class="na"&gt;python&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;install&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pip&lt;/span&gt;
      &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
      &lt;span class="na"&gt;extra_requirements&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;docs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On push event, RTD runner works these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up Python 3.11 (ref: &lt;code&gt;build.tools&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Install dependencies by docs/requirements.txt (ref: &lt;code&gt;python.install&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Build document by dirhtml builder using docs/conf.py (ref: &lt;code&gt;sphinx&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Custom build supportings
&lt;/h2&gt;

&lt;p&gt;There is &lt;code&gt;build.commands&lt;/code&gt; property in &lt;code&gt;.readthedocs.yaml&lt;/code&gt; that define procedures to build contents from source.&lt;br&gt;
as far as it outputs contents into specified path, RTD deploy it as published site.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;

&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;os&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-22.04&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;python&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3.12"&lt;/span&gt;
  &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pip install pelican&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pelican --settings docs/pelicanconf.py --output $READTHEDOCS_OUTPUT/html/ docs/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is example on reference about &lt;a href="https://docs.readthedocs.io/en/stable/config-file/v2.html#build-commands" rel="noopener noreferrer"&gt;&lt;code&gt;build.commands&lt;/code&gt;&lt;/a&gt;.&lt;br&gt;
It runs pelican (other website build of Python) and output &lt;code&gt;$READTHEDOCS_OUTPUT/html&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Anything is ok that programs generate html files.&lt;br&gt;
&lt;strong&gt;Even if it generate presentation.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy presentation on Read the Docs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;

&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;os&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ubuntu-22.04'&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;python&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.11'&lt;/span&gt;
  &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pip install -r requirements.txt&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sphinx-build -b revealjs source $READTHEDOCS_OUTPUT/html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is &lt;code&gt;.readthedocs.yaml&lt;/code&gt; of &lt;a href="https://github.com/attakei-sandbox/sphinx-rtd-revealjs/" rel="noopener noreferrer"&gt;example for deploy Reveal.js presentation by sphinx-revealjs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sphinx-rtd-revealjs.readthedocs.io/stable/" rel="noopener noreferrer"&gt;There is generated presentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros and Cons
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep older presentation for users (e.g. seeing archive movie of YouTube).

&lt;ul&gt;
&lt;li&gt;Presentation should be fixed for typo and more.&lt;/li&gt;
&lt;li&gt;If author update with bigger changes, user can see old version.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;It can toggle version by bundle widget of RTD.&lt;/li&gt;

&lt;li&gt;It can be visible or hidden manually.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;RTD adds AD on presentation.&lt;/li&gt;
&lt;li&gt;Presentation does not root of FQDN.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>readthedocs</category>
      <category>sphinxdoc</category>
    </item>
    <item>
      <title>A short hack to deploy reveal.js presentation on Read the Docs</title>
      <dc:creator>kAZUYA tAKEI</dc:creator>
      <pubDate>Sun, 03 Apr 2022 09:11:51 +0000</pubDate>
      <link>https://dev.to/attakei/a-short-hack-to-deploy-revealjs-presentation-on-read-the-docs-292b</link>
      <guid>https://dev.to/attakei/a-short-hack-to-deploy-revealjs-presentation-on-read-the-docs-292b</guid>
      <description>&lt;p&gt;This is an introduction to serve reveal.js slide to &lt;a href="https://readthedocs.org"&gt;Read the docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Abstract
&lt;/h2&gt;

&lt;p&gt;Edit your &lt;code&gt;conf.py&lt;/code&gt; to override target builder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;override_builder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Change for your RTD settings. Please set it in your RTD prject
&lt;/span&gt;    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;builders&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"singlehtml"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;builders&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"revealjs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"config-inited"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;override_builder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see contents and sources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/attakei-sandbox/sphinx-rtd-revealjs"&gt;https://github.com/attakei-sandbox/sphinx-rtd-revealjs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sphinx-rtd-revealjs.readthedocs.io/en/latest/"&gt;https://sphinx-rtd-revealjs.readthedocs.io/en/latest/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Approaching
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problems for regular usage to server sphinx-revealjs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Read the docs&lt;/strong&gt; are documentation platform supporting Sphinx.&lt;br&gt;
You can serve HTML files from Sphinx documentation as same as run &lt;code&gt;make html&lt;/code&gt; on local.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sphinx-revealjs&lt;/strong&gt; is Sphinx extension to provide builder that generate Reveal.js style HTML. (ex: call &lt;code&gt;make revealjs&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;RTD supports only &lt;code&gt;html&lt;/code&gt;, &lt;code&gt;dirhtml&lt;/code&gt; and &lt;code&gt;singlehtml&lt;/code&gt; for HTML buildings.&lt;br&gt;
So, it is difficult to server reveal.js presentation of sphinx-revealjs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sphinx can override builder object
&lt;/h3&gt;

&lt;p&gt;Sphinx provides Application API to inject procedures on some events.&lt;br&gt;
&lt;code&gt;config-inited&lt;/code&gt; event is called on after loading all configuration before creating target-builder object.&lt;/p&gt;

&lt;p&gt;We can modify builder-class in the handler for this event, and can use any builder in RTD.&lt;br&gt;
(please see abstract for example)&lt;/p&gt;

&lt;h2&gt;
  
  
  Caution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cannot serve regular name builds
&lt;/h3&gt;

&lt;p&gt;This hack switches the builder, and you cannot use regular builder.&lt;br&gt;
You should be careful what builder you want to call.&lt;/p&gt;

&lt;h3&gt;
  
  
  RTD widget is not working
&lt;/h3&gt;

&lt;p&gt;RTD provides widget for versioning and i18n.&lt;br&gt;
But reveal.js content does not render wighet.&lt;br&gt;
You can serve single version presentation only!&lt;/p&gt;

&lt;h3&gt;
  
  
  This hack is NOT clean
&lt;/h3&gt;

&lt;p&gt;This is dirty hack.&lt;br&gt;
RTD may not accept this hack in backend.&lt;/p&gt;

</description>
      <category>python</category>
      <category>sphinx</category>
      <category>readthedoc</category>
      <category>revealjs</category>
    </item>
    <item>
      <title>Create Errbot backend/storage plugin as PyPI package</title>
      <dc:creator>kAZUYA tAKEI</dc:creator>
      <pubDate>Wed, 15 May 2019 15:04:09 +0000</pubDate>
      <link>https://dev.to/attakei/create-errbot-backend-storage-plugin-as-pypi-package-cc6</link>
      <guid>https://dev.to/attakei/create-errbot-backend-storage-plugin-as-pypi-package-cc6</guid>
      <description>&lt;p&gt;In develoving some Errbot plugins, I am thinking that storage and backend plugins have better managed as package (if possible, should be register at PyPI)&lt;/p&gt;

&lt;h1&gt;
  
  
  1. In bootstrapping, Errbot does not install dependencies of backend and backend.
&lt;/h1&gt;

&lt;p&gt;To run bot, I call &lt;code&gt;errbot&lt;/code&gt; command. In this command, load plugins in order of storage, backend and bot-plugins.&lt;br&gt;
When bootstrap load storage and backend plugin, it does not check dependencies.&lt;/p&gt;

&lt;p&gt;Actually some plugins let to install dependencies by command-line.&lt;/p&gt;

&lt;p&gt;ex:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/errbotio/errbot-backend-skype"&gt;https://github.com/errbotio/errbot-backend-skype&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Vaelor/errbot-mattermost-backend"&gt;https://github.com/Vaelor/errbot-mattermost-backend&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If plugins have dependencies and need to install manually these, I think better to define as module and package. &lt;/p&gt;
&lt;h1&gt;
  
  
  2. In running, Errbot does not change dynamically storage and backend.
&lt;/h1&gt;

&lt;p&gt;Errbot is running as daemon generally. for that reason, storage and backend plugin will not almost be changed in running.&lt;/p&gt;

&lt;p&gt;Therefore, these can be managed as requirements together with Errbot core.&lt;br&gt;
If this, &lt;code&gt;pip install -r requirements.txt&lt;/code&gt; in your local repository can install all dependencies.&lt;/p&gt;

&lt;p&gt;ex: (these plugins are not registered in PyPI)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;errbot
errbot-backend-gitter
errbot-storage-firebase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Create as project
&lt;/h1&gt;

&lt;h2&gt;
  
  
  List of files
&lt;/h2&gt;

&lt;p&gt;Project structure is same to standard python package.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;setup.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;setup.cfg&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;README.rst&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MANIFEST.in&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;errbot_backend_demo&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__init__.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;demo.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;demo.plug&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Writings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;setup.py&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;It can write simply.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;setuptools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;

&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;setup.cfg&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Currently, all metadata can write in setup.cfg.&lt;br&gt;
Please define &lt;code&gt;options.package_data&lt;/code&gt; section and &lt;code&gt;include_package_data&lt;/code&gt; key  to include .plug file as installation resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[metadata]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;errbot-backend-demo&lt;/span&gt;
&lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;attr:errbot_backend_demo.__version__&lt;/span&gt;
&lt;span class="py"&gt;author&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Kazuya Takei&lt;/span&gt;
&lt;span class="py"&gt;author_email&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;attakei@example.com&lt;/span&gt;
&lt;span class="py"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Demo backend plugin for Errbot&lt;/span&gt;
&lt;span class="py"&gt;long_description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;file:README.rst&lt;/span&gt;

&lt;span class="nn"&gt;[options]&lt;/span&gt;
&lt;span class="py"&gt;install_requires&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;YOUR_DEPENDENCIES&lt;/span&gt;
&lt;span class="py"&gt;packages&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;find:&lt;/span&gt;
&lt;span class="py"&gt;include_package_data&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;True&lt;/span&gt;

&lt;span class="nn"&gt;[options.package_data]&lt;/span&gt;
&lt;span class="py"&gt;errbot_backend_demo&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;*.plug&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;LICENSE.rst&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Write normally.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;MANIFEST.in&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;As same as &lt;code&gt;setup.cfg&lt;/code&gt;, define .plug as include file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include errbot_backend_demo/*.plug
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;__init__.py&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Define version of package here. And define function to return path of installation path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;


&lt;span class="n"&gt;__version__&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'0.0.1-alpha.1'&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_plugin_dir&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;module_dir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;parent&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;module_dir&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;demo.py&lt;/code&gt; and &lt;code&gt;demo.plug&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Write normally as plugin.&lt;/p&gt;

&lt;h1&gt;
  
  
  Use in Errbot config.py
&lt;/h1&gt;

&lt;p&gt;If plugin define as package by these, you can write config.py to use plugin.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;errbot_backend_demo&lt;/span&gt;

&lt;span class="n"&gt;BOT_EXTRA_BACKEND_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;errbot_backend_demo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_plugin_dir&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;BACKEND&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Demo'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>python</category>
      <category>errbot</category>
    </item>
    <item>
      <title>Sphinx extension to generate Reveal.js presentation from plain reST</title>
      <dc:creator>kAZUYA tAKEI</dc:creator>
      <pubDate>Mon, 12 Nov 2018 07:41:24 +0000</pubDate>
      <link>https://dev.to/attakei/sphinx-extension-to-generate-revealjs-presentation-from-plain-rest-58ip</link>
      <guid>https://dev.to/attakei/sphinx-extension-to-generate-revealjs-presentation-from-plain-rest-58ip</guid>
      <description>&lt;p&gt;I create Sphinx extension to convert Reveal.js presentation from &lt;strong&gt;plain&lt;/strong&gt; reStructuredText. please try it, if you match want to write Reveal.js by Sphinx(reStructuredText)&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/attakei"&gt;
        attakei
      &lt;/a&gt; / &lt;a href="https://github.com/attakei/sphinx-revealjs"&gt;
        sphinx-revealjs
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Sphinx builder to revealjs presentations
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="rst"&gt;
&lt;h1&gt;
sphinx-revealjs&lt;/h1&gt;
&lt;a href="https://pypi.org/project/sphinx-revealjs/" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/6d49ba308f3eaa54b528e65f2ec0cc79ff1bbfc0/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f737068696e782d72657665616c6a732e737667"&gt;
&lt;/a&gt;
&lt;a href="https://github.com/attakei/sphinx-revealjs/actions"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7iU4GKzk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/attakei/sphinx-revealjs/workflows/Testings/badge.svg"&gt;
&lt;/a&gt;
&lt;a href="https://travis-ci.org/attakei/sphinx-revealjs" rel="nofollow"&gt;&lt;img alt="https://travis-ci.org/attakei/sphinx-revealjs.svg?branch=master" src="https://camo.githubusercontent.com/e02f88a7ee187e331d24d1791e419786266e8936/68747470733a2f2f7472617669732d63692e6f72672f617474616b65692f737068696e782d72657665616c6a732e7376673f6272616e63683d6d6173746572"&gt;&lt;/a&gt;
&lt;p&gt;Sphinx extention with theme to generate Reveal.js presentation&lt;/p&gt;

&lt;h2&gt;
Orverview&lt;/h2&gt;
&lt;p&gt;This extension generate Reveal.js presentation
from &lt;strong&gt;standard&lt;/strong&gt; reStructuredText.&lt;/p&gt;
&lt;p&gt;It include theses features.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom builder to translate from reST to reveal.js style HTML&lt;/li&gt;
&lt;li&gt;Template to be enable to render presentation local imdependent&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;$ pip install sphinx-revealjs&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;
Usage&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create your sphinx documentation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit conf.py to use this extension&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight highlight-source-python"&gt;&lt;pre&gt;&lt;span class="pl-s1"&gt;extensions&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; [
    &lt;span class="pl-s"&gt;'sphinx_revealjs'&lt;/span&gt;,
]&lt;/pre&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write source for standard document style&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build sources as Reveal.js presentation&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;$ make revealjs&lt;/pre&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
Change logs&lt;/h2&gt;
&lt;p&gt;See &lt;a href="https://raw.githubusercontent.com/attakei/sphinx-revealjs/master/README.rst/./CHANGES.rst"&gt;it&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
Futures&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Index template as none presentation&lt;/li&gt;
&lt;li&gt;CDN support&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
Copyright&lt;/h2&gt;
&lt;p&gt;Apache-2.0 license. Please see &lt;a href="https://raw.githubusercontent.com/attakei/sphinx-revealjs/master/README.rst/./LICENSE"&gt;LICENSE&lt;/a&gt;.&lt;/p&gt;

&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/attakei/sphinx-revealjs"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;If you want to see source and output, click these links. These are pair of simple reST source and generated presentation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source from

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/attakei/sphinx-revealjs/master/demo/index.rst"&gt;https://raw.githubusercontent.com/attakei/sphinx-revealjs/master/demo/index.rst&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Output to

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://attakei.github.io/sphinx-revealjs/index.html"&gt;https://attakei.github.io/sphinx-revealjs/index.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Installation and usage
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install git+https://github.com/attakei/sphinx-revealjs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add extension to your sphinx &lt;code&gt;conf.py&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;extensions = [
    'sphinx_revealjs',
]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Write your presentation source by reST, and build
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ make revealjs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Concepts
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Use default nodes and directives as more as possible&lt;/li&gt;
&lt;li&gt;Manage multiple presentations in one Sphinx documentation

&lt;ul&gt;
&lt;li&gt;and, can switch themes per documents&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supporting features in reST
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Section (convert reveal.js section)&lt;/li&gt;
&lt;li&gt;Comment (use for speaker note)&lt;/li&gt;
&lt;li&gt;Code block (convert reveal.js style code block)&lt;/li&gt;
&lt;li&gt;And other directives (inherit Sphinx HTML5 builder)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Short examples for convert
&lt;/h1&gt;

&lt;p&gt;Your write source like this..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=====
Title
=====

Section 1
=========

content 1

Section 2
=========

content 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It can convert this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Section 1&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;content 1&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Section 2&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;content 2&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Of course, support nested section.&lt;/p&gt;

&lt;p&gt;from&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=====
Title
=====

Section 1
=========

content 1.1
-----------

content body

content 1.2
-----------

content body

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Section 1&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;content 1.1&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;content body&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;content 1.2&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;content body&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>python</category>
      <category>sphinx</category>
      <category>revealjs</category>
    </item>
  </channel>
</rss>
