|
|
%!s(int64=10) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| Readme.md | %!s(int64=10) %!d(string=hai) anos | |
| __init__.py | %!s(int64=10) %!d(string=hai) anos | |
| section_number.py | %!s(int64=10) %!d(string=hai) anos | |
This plugin adds section number to the article's context, in the form of X.X.X. Sections are indicated by <h1>-<h6> in the parsed html format.
By default, up to 3 levels of sections are numbered. You can customize this value by defining SECTION_NUMBER_MAX in your setting file:
SECTION_NUMBER_MAX = 5
The first section in the article will be marked as the top section level. Namely, if <h3> is the first encountered section, no <h1> or <h2> is supposed to exist. Else, exception may be thrown out.
the following markdown content:
# section
blabla
## subsection
blabla
## subsection
blabla
# section
blabla
will be
#1 section blabla ##1.1 subsection blabla ##1.2 subsection blabla #2 section blabla