Merge pull request #170 from readthedocs/release/0.6.0

Setup release 0.6.0
This commit is contained in:
Eric Holscher 2019-08-09 11:31:46 -07:00 committed by GitHub
commit 48f9d1a684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 7 deletions

1
.gitignore vendored
View file

@ -28,6 +28,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
node_modules/
# PyInstaller
# Usually these files are written by a python script from a template

View file

@ -1,3 +1,34 @@
Version 0.6.0
-------------
Date: 2019-08-09
- [@RaptorCZ](http://github.com/RaptorCZ): Process linebreaks and
convert them to br element.
([\#162](https://github.com/readthedocs/recommonmark/pull/162))
- [@gibfahn](http://github.com/gibfahn): Remove URL quoting from refs
before passing to Sphinx
([\#158](https://github.com/readthedocs/recommonmark/pull/158))
- [@dandersson](http://github.com/dandersson): Use image description
text as \"alt\", drop title
([\#150](https://github.com/readthedocs/recommonmark/pull/150))
- [@annegentle](http://github.com/annegentle): Clarify the specifics
of Auto Toc Tree
([\#149](https://github.com/readthedocs/recommonmark/pull/149))
- [@loganrosen](http://github.com/loganrosen): Bump dependency on
commonmark to \>= 0.8.1
([\#147](https://github.com/readthedocs/recommonmark/pull/147))
- [@codejamninja](http://github.com/codejamninja): Use official
gitignore template
([\#140](https://github.com/readthedocs/recommonmark/pull/140))
- [@dotlambda](http://github.com/dotlambda): Include all test files in
PyPI tarball
([\#128](https://github.com/readthedocs/recommonmark/pull/128))
- [@tk0miya](http://github.com/tk0miya): Register a parser class using
new Sphinx API; add\_source\_suffix
([\#113](https://github.com/readthedocs/recommonmark/pull/113))
## Changelog
## 0.4.0 (in development)

View file

@ -1,5 +1,6 @@
AutoStructify Component
=======================
AutoStructify is a component in recommonmark that takes a parsed docutil AST by `CommonMarkParser`,
and transform it to another AST that introduces some of more. This enables additional features
of recommonmark syntax, to introduce more structure into the final generated document.
@ -7,6 +8,7 @@ of recommonmark syntax, to introduce more structure into the final generated doc
Configuring AutoStructify
-------------------------
The behavior of AutoStructify can be configured via a dict in document setting.
In sphinx, you can configure it by `conf.py`. The following snippet
is what is actually used to generate this document, see full code at [conf.py](conf.py).
@ -21,9 +23,11 @@ def setup(app):
app.add_transform(AutoStructify)
```
All the features are by default enabled
***List of options***
* __enable_auto_toc_tree__: whether enable [Auto Toc Tree](#auto-toc-tree) feature.
* __auto_toc_tree_section__: when enabled, [Auto Toc Tree](#auto-toc-tree) will only be enabled on section that matches the title.
* __enable_auto_doc_ref__: whether enable [Auto Doc Ref](#auto-doc-ref) feature. **Deprecated**
@ -34,6 +38,7 @@ All the features are by default enabled
Auto Toc Tree
-------------
One of important command in tools like sphinx is `toctree`. This is a command to generate table of contents and
tell sphinx about the structure of the documents. In markdown, usually we manually list of contents by a bullet list
of url reference to the other documents.
@ -44,7 +49,9 @@ AutoStructify transforms bullet list of document URLs like this
* [Title1](doc1.md)
* [Title2](doc2.md)
```
to the AST of this following reStructuredText code
```rst
.. toctree::
:maxdepth: 1
@ -52,6 +59,7 @@ to the AST of this following reStructuredText code
doc1
doc2
```
You can also find the usage of this feature in `index.md` of this document.
Auto Doc Ref
@ -66,10 +74,13 @@ Auto Doc Ref
It is common to refer to another document page in one document. We usually use reference to do that.
AutoStructify will translate these reference block into a structured document reference. For example
```
[API Reference](api_ref.md)
```
will be translated to the AST of following reStructuredText code
```
:doc:`API Reference </api_ref>`
```
@ -77,6 +88,7 @@ And it will be rendered as [API Reference](api_ref)
URL Resolver
------------
Sometimes in a markdown, we want to refer to the code in the same repo.
This can usually be done by a reference by reference path. However, since the generated document is hosted elsewhere,
the relative path may not work in generated document site. URL resolver is introduced to solve this problem.
@ -87,9 +99,9 @@ So `[parser code](../recommonmark/parser.py)` will be translated into [parser co
Note that the reference to the internal document will not be passed to url resolver, and will be linked to the internal document pages correctly, see [Auto Doc Ref](#auto-doc-ref).
Codeblock Extensions
--------------------
In markdown, you can write codeblocks fenced by (at least) three backticks
(```` ``` ````). The following is an example of codeblock.

View file

@ -21,12 +21,8 @@ import shlex
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import recommonmark
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
source_parsers = {
'.md': CommonMarkParser
}
source_suffix = ['.rst', '.md']
@ -42,6 +38,7 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.mathjax',
'recommonmark',
]
# Add any paths that contain templates here, relative to this directory.

View file

@ -1,6 +1,6 @@
"""Docutils CommonMark parser"""
__version__ = '0.5.0'
__version__ = '0.6.0'
def setup(app):

View file

@ -1,2 +1,11 @@
[bdist_wheel]
universal=1
universal = 1
[metadata]
name = recommonmark
version = 0.6.0
[tool:release]
github_owner = readthedocs
github_repo = recommonmark