Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.

Commit 48f9d1a

Browse files
authored
Merge pull request #170 from readthedocs/release/0.6.0
Setup release 0.6.0
2 parents c4d575b + cdd25e3 commit 48f9d1a

File tree

6 files changed

+57
-7
lines changed

6 files changed

+57
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ share/python-wheels/
2828
.installed.cfg
2929
*.egg
3030
MANIFEST
31+
node_modules/
3132

3233
# PyInstaller
3334
# Usually these files are written by a python script from a template

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
2+
Version 0.6.0
3+
-------------
4+
5+
Date: 2019-08-09
6+
7+
- [@RaptorCZ](http://github.com/RaptorCZ): Process linebreaks and
8+
convert them to br element.
9+
([\#162](https://github.com/readthedocs/recommonmark/pull/162))
10+
- [@gibfahn](http://github.com/gibfahn): Remove URL quoting from refs
11+
before passing to Sphinx
12+
([\#158](https://github.com/readthedocs/recommonmark/pull/158))
13+
- [@dandersson](http://github.com/dandersson): Use image description
14+
text as \"alt\", drop title
15+
([\#150](https://github.com/readthedocs/recommonmark/pull/150))
16+
- [@annegentle](http://github.com/annegentle): Clarify the specifics
17+
of Auto Toc Tree
18+
([\#149](https://github.com/readthedocs/recommonmark/pull/149))
19+
- [@loganrosen](http://github.com/loganrosen): Bump dependency on
20+
commonmark to \>= 0.8.1
21+
([\#147](https://github.com/readthedocs/recommonmark/pull/147))
22+
- [@codejamninja](http://github.com/codejamninja): Use official
23+
gitignore template
24+
([\#140](https://github.com/readthedocs/recommonmark/pull/140))
25+
- [@dotlambda](http://github.com/dotlambda): Include all test files in
26+
PyPI tarball
27+
([\#128](https://github.com/readthedocs/recommonmark/pull/128))
28+
- [@tk0miya](http://github.com/tk0miya): Register a parser class using
29+
new Sphinx API; add\_source\_suffix
30+
([\#113](https://github.com/readthedocs/recommonmark/pull/113))
31+
132
## Changelog
233

334
## 0.4.0 (in development)

docs/auto_structify.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
AutoStructify Component
22
=======================
3+
34
AutoStructify is a component in recommonmark that takes a parsed docutil AST by `CommonMarkParser`,
45
and transform it to another AST that introduces some of more. This enables additional features
56
of recommonmark syntax, to introduce more structure into the final generated document.
67

78

89
Configuring AutoStructify
910
-------------------------
11+
1012
The behavior of AutoStructify can be configured via a dict in document setting.
1113
In sphinx, you can configure it by `conf.py`. The following snippet
1214
is what is actually used to generate this document, see full code at [conf.py](conf.py).
@@ -21,9 +23,11 @@ def setup(app):
2123
app.add_transform(AutoStructify)
2224

2325
```
26+
2427
All the features are by default enabled
2528

2629
***List of options***
30+
2731
* __enable_auto_toc_tree__: whether enable [Auto Toc Tree](#auto-toc-tree) feature.
2832
* __auto_toc_tree_section__: when enabled, [Auto Toc Tree](#auto-toc-tree) will only be enabled on section that matches the title.
2933
* __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
3438

3539
Auto Toc Tree
3640
-------------
41+
3742
One of important command in tools like sphinx is `toctree`. This is a command to generate table of contents and
3843
tell sphinx about the structure of the documents. In markdown, usually we manually list of contents by a bullet list
3944
of url reference to the other documents.
@@ -44,14 +49,17 @@ AutoStructify transforms bullet list of document URLs like this
4449
* [Title1](doc1.md)
4550
* [Title2](doc2.md)
4651
```
52+
4753
to the AST of this following reStructuredText code
54+
4855
```rst
4956
.. toctree::
5057
:maxdepth: 1
5158
5259
doc1
5360
doc2
5461
```
62+
5563
You can also find the usage of this feature in `index.md` of this document.
5664

5765
Auto Doc Ref
@@ -66,17 +74,21 @@ Auto Doc Ref
6674

6775
It is common to refer to another document page in one document. We usually use reference to do that.
6876
AutoStructify will translate these reference block into a structured document reference. For example
77+
6978
```
7079
[API Reference](api_ref.md)
7180
```
81+
7282
will be translated to the AST of following reStructuredText code
83+
7384
```
7485
:doc:`API Reference </api_ref>`
7586
```
7687
And it will be rendered as [API Reference](api_ref)
7788

7889
URL Resolver
7990
------------
91+
8092
Sometimes in a markdown, we want to refer to the code in the same repo.
8193
This can usually be done by a reference by reference path. However, since the generated document is hosted elsewhere,
8294
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
8799

88100
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).
89101

90-
91102
Codeblock Extensions
92103
--------------------
104+
93105
In markdown, you can write codeblocks fenced by (at least) three backticks
94106
(```` ``` ````). The following is an example of codeblock.
95107

docs/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@
2121
# documentation root, use os.path.abspath to make it absolute, like shown here.
2222
sys.path.insert(0, os.path.abspath('..'))
2323
import recommonmark
24-
from recommonmark.parser import CommonMarkParser
2524
from recommonmark.transform import AutoStructify
2625

27-
source_parsers = {
28-
'.md': CommonMarkParser
29-
}
3026

3127
source_suffix = ['.rst', '.md']
3228

@@ -42,6 +38,7 @@
4238
'sphinx.ext.autodoc',
4339
'sphinx.ext.napoleon',
4440
'sphinx.ext.mathjax',
41+
'recommonmark',
4542
]
4643

4744
# Add any paths that contain templates here, relative to this directory.

recommonmark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Docutils CommonMark parser"""
22

3-
__version__ = '0.5.0'
3+
__version__ = '0.6.0'
44

55

66
def setup(app):

setup.cfg

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
[bdist_wheel]
2-
universal=1
2+
universal = 1
3+
4+
[metadata]
5+
name = recommonmark
6+
version = 0.6.0
7+
8+
[tool:release]
9+
github_owner = readthedocs
10+
github_repo = recommonmark
11+

0 commit comments

Comments
 (0)