Nikhil Ramakrishnan pushed to branch master at FreeType / docwriter
Commits:
-
6e195196
by Nikhil Ramakrishnan at 2021-06-26T15:08:23+05:30
-
1f3caadd
by Nikhil Ramakrishnan at 2021-06-26T19:10:24+05:30
-
59073587
by Nikhil Ramakrishnan at 2021-06-26T19:16:49+05:30
-
81dcbef0
by Nikhil Ramakrishnan at 2021-06-26T19:37:43+05:30
5 changed files:
Changes:
1 |
+docwriter-1.3.2 (2021-06-26)
|
|
2 |
+ |
|
3 |
+ * Convert dashes and ellipsis to HTML equivalents.
|
|
4 |
+ * Update to mkdocs 1.2.1 and mkdocs-material 7.0.6.
|
|
5 |
+ |
|
1 | 6 |
docwriter-1.3.1 (2021-03-29)
|
2 | 7 |
|
3 | 8 |
* Add regression tests.
|
... | ... | @@ -14,7 +14,7 @@ Python >= 3.5 to run. |
14 | 14 |
## Steps to Generate Docs
|
15 | 15 |
1. Ensure `docwriter` is installed using `pip`.
|
16 | 16 |
|
17 |
-2. Clone the freetype2 repository from
|
|
17 |
+2. Clone the freetype repository from
|
|
18 | 18 |
[here](https://gitlab.freedesktop.org/freetype/freetype.git).
|
19 | 19 |
|
20 | 20 |
3. The FreeType build system can be used to generate the docs:
|
... | ... | @@ -32,10 +32,10 @@ Python >= 3.5 to run. |
32 | 32 |
|
33 | 33 |
## Development Usage
|
34 | 34 |
1. Clone this repository.
|
35 |
-2. Clone the freetype2 repository from
|
|
35 |
+2. Clone the freetype repository from
|
|
36 | 36 |
[here](https://gitlab.freedesktop.org/freetype/freetype.git).
|
37 | 37 |
3. Run `pip install -r requirements.txt` in your environment (`virtualenv` recommended).
|
38 |
-4. Copy the `include/` directory from `freetype2` to `docwriter`.
|
|
38 |
+4. Copy the `include/` directory from `freetype` to `docwriter`.
|
|
39 | 39 |
5. Run in the `docwriter` directory:
|
40 | 40 |
|
41 | 41 |
```bash
|
... | ... | @@ -50,7 +50,7 @@ Python >= 3.5 to run. |
50 | 50 |
```
|
51 | 51 |
6. The markdown files are generated in `docs/markdown/`. Static site can be built by running
|
52 | 52 |
`mkdocs build` in `docs/`. Read more about Mkdocs
|
53 |
- [here](https://www.mkdocs.org/#building-the-site).
|
|
53 |
+ [here](https://www.mkdocs.org/getting-started/#building-the-site).
|
|
54 | 54 |
|
55 | 55 |
## Usage Information
|
56 | 56 |
|
... | ... | @@ -43,6 +43,7 @@ site_name = "FreeType API Reference" |
43 | 43 |
site_description = "API Reference documentation for FreeType"
|
44 | 44 |
site_author = "FreeType Contributors"
|
45 | 45 |
use_dir_url = False
|
46 |
+site_url = None
|
|
46 | 47 |
|
47 | 48 |
# Theme configuration default values
|
48 | 49 |
theme_conf = {}
|
... | ... | @@ -150,6 +151,7 @@ class SiteConfig: |
150 | 151 |
self.site_dir = utils.site_dir
|
151 | 152 |
self.theme_conf = theme_conf
|
152 | 153 |
self.use_dir_url = use_dir_url
|
154 |
+ self.site_url = site_url
|
|
153 | 155 |
|
154 | 156 |
def set_site_info( self, name, description = None, author = None ):
|
155 | 157 |
"""Set the basic site information."""
|
... | ... | @@ -210,6 +212,8 @@ class SiteConfig: |
210 | 212 |
if use_dir_url is not None:
|
211 | 213 |
self.site_config['use_directory_urls'] = self.use_dir_url
|
212 | 214 |
|
215 |
+ self.site_config['site_url'] = self.site_url
|
|
216 |
+ |
|
213 | 217 |
def build_theme_config( self ):
|
214 | 218 |
# internal: build theme config
|
215 | 219 |
if theme_conf != {}:
|
... | ... | @@ -277,6 +277,11 @@ class MdFormatter( Formatter ): |
277 | 277 |
line )
|
278 | 278 |
# convert tilde into non-breaking space
|
279 | 279 |
line = line.replace( "~", " " )
|
280 |
+ # convert '---' and '--' dashes into em and en dashes
|
|
281 |
+ line = line.replace( "---", "—" )
|
|
282 |
+ line = line.replace( "--", "–" )
|
|
283 |
+ # convert '...' into ellipsis
|
|
284 |
+ line = line.replace( "...", "…" )
|
|
280 | 285 |
|
281 | 286 |
# Return
|
282 | 287 |
if in_html:
|
... | ... | @@ -14,6 +14,6 @@ |
14 | 14 |
|
15 | 15 |
# Direct project dependencies
|
16 | 16 |
mistune==0.8.4
|
17 |
-mkdocs==1.1.2
|
|
18 |
-mkdocs-material==7.0.7
|
|
17 |
+mkdocs==1.2.1
|
|
18 |
+mkdocs-material==7.1.9
|
|
19 | 19 |
PyYAML==5.4.1
|