Skip to content

Commit 6dcf55a

Browse files
committed
v0.15.1: fix Windows PDF bug
1 parent dc54c1f commit 6dcf55a

File tree

9 files changed

+21
-14
lines changed

9 files changed

+21
-14
lines changed

dactyl/dactyl_build.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
# Necessary for prince
2020
import subprocess
21+
import sys
2122
from time import sleep
2223

2324
# Used to fetch markdown sources from the net
@@ -464,7 +465,7 @@ def assemble_pdf(self):
464465
if self.http_port:
465466
# Start up an HTTP server for Prince. This helps it resolve absolute
466467
# URLs in hyperlinks correctly (which --fileroot doesn't quite do)
467-
server = subprocess.Popen(["python3", "-m", "http.server", str(self.http_port)])
468+
server = subprocess.Popen([sys.executable, "-m", "http.server", str(self.http_port)])
468469
# Wait for server to start
469470
sleep(1)
470471

@@ -493,7 +494,7 @@ def watch(self):
493494
"""
494495

495496
if self.mode == "html" and self.http_port:
496-
server = subprocess.Popen(["python3", "-m", "http.server",
497+
server = subprocess.Popen([sys.executable, "-m", "http.server",
497498
str(self.http_port), "-d", self.out_path])
498499

499500
event_handler = UpdaterHandler(builder=self)

dactyl/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.15.0'
1+
__version__ = '0.15.1'

examples/content/conditionals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
You can use the preprocessor to hide or show certain content based on various conditions. For example, you can have a page used in multiple targets, but omit certain portions from the output in some targets. Or, you can have text and markup that only shows up in HTML mode but not PDF mode or similar rules.
44

5-
You can use any of [the fields available to the preprocessor](https://github.com/ripple/dactyl/#pre-processing) for your conditionals, including [commandline variables](cli-vars.html) and any fields defined in the [frontmatter](with-frontmatter.html).
5+
You can use any of [the fields available to the preprocessor](https://github.com/ripple/dactyl/#pre-processing) for your conditionals, including [commandline variables](cli-vars.html) and any fields defined in the [frontmatter](frontmatter.html).
66

77
Example of printing different text by :
88

examples/content/extending/templates.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Many of the built-in templates work better if you set certain fields on your tar
1919
| `google_analytics_tag` | String tag to use with Google Analytics, e.g. "UA-00000000-0". If not defined, doesn't load Google Analytics. |
2020
| `repository` | URL to this site's source repository on GitHub. Required for the "Edit on GitHub" button. |
2121
| `url` | The fully-qualified URL for the base of the site. Required by the sitemap and Google Search templates. |
22-
| `stylesheet` | URL or path to the default stylesheet. The default includes Bootstrap 4.5 as well as custom CSS for code tabs, callouts, and the page layout. See the [styles dir](./dactyl/styles/) for the source SCSS. The default is served by dactyl.link. |
22+
| `stylesheet` | URL or path to the default stylesheet. The default includes Bootstrap 4.5 as well as custom CSS for code tabs, callouts, and the page layout. See the [styles dir](https://github.com/ripple/dactyl/tree/master/dactyl/styles) for the source SCSS. The default is served by dactyl.link. |
2323
| `dactyljs` | URL or path to the Dactyl JavaScript file to use. This defines "jump to top" and code tab behavior. The default is served by dactyl.link. |
2424
| `bootstrapjs` | URL or path to the Bootstrap JavaScript file to use. The default is served by BootstrapCDN. |
2525
| `fontawesomecss` | URL or path to FontAwesome (v4) CSS file to use. The default is served by BootstrapCDN. |
@@ -39,7 +39,7 @@ The following built-in templates represent **full pages**, so you can use them w
3939
| `simple.html` | A minimal template with no dependencies. |
4040
| `template-sitemap.txt` | A template for a text [sitemap](https://support.google.com/webmasters/answer/183668?hl=en) for use by search engines. |
4141

42-
When extending the default templates, you many of them have blocks you can replace. For the full list, see [the templates](./dactyl/templates/) directly.
42+
When extending the default templates, you many of them have blocks you can replace. For the full list, see [the templates](https://github.com/ripple/dactyl/tree/master/dactyl/templates) directly.
4343

4444

4545
### Module Templates
@@ -97,8 +97,8 @@ Dactyl provides the following information to templates, which you can access wit
9797

9898
| Field | Value |
9999
|:------------------|:---------------------------------------------------------|
100-
| `target` | The [target](#targets) definition of the current target. |
101-
| `pages` | The [array of page definitions](#pages) in the current target. Use this to generate navigation across pages. (The default templates don't do this, but you should.) |
100+
| `target` | The [target](config.html#targets) definition of the current target. |
101+
| `pages` | The [array of page definitions](config.html#pages) in the current target. Use this to generate navigation across pages. (The default templates don't do this, but you should.) |
102102
| `currentpage` | The definition of the page currently being rendered. |
103103
| `categories` | A de-duplicated array of categories that are used by at least one page in this target, sorted in the order they first appear. |
104104
| `config` | The global Dactyl config object. |

examples/content/filters/external_links.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ This filter adds an "external link" icon to [links to outside websites](https://
1111

1212
A [link to another page](filters.html) won't have the icon.
1313

14-
If you try to combine this filter with the [button links filter >](https://dactyl.link/filter-examples-buttonize.html), make sure **buttonize runs first**. Otherwise, external links will not get styled as buttons when intended.
14+
If you try to combine this filter with the [button links filter >](https://dactyl.link/buttonize.html), make sure **buttonize runs first**. Otherwise, external links will not get styled as buttons when intended.

examples/content/gfm-compat.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ GitHub-Flavored Markdown has some stuff that Dactyl doesn't do and vice-versa, a
1111

1212
Dactyl doesn't do any of the following:
1313

14-
* https://github.com/gitlabhq/gitlabhq/blob/master/doc/markdown/markdown.md#url-auto-linking
15-
* [Emoji codes](https://github.com/gitlabhq/gitlabhq/blob/master/doc/markdown/markdown.md#emoji)
14+
* [Automatically make URLs into hyperlinks](https://github.github.com/gfm/#autolinks-extension-)
15+
* [Emoji codes](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emoji)
1616
* Task lists
1717
- [x] completed
1818
- [ ] incomplete
19-
* [GitLab references](https://github.com/gitlabhq/gitlabhq/blob/master/doc/markdown/markdown.md#special-gitlab-references)
19+
* [Automatic references to GitHub (or GitLab) issues, commits, or external resources](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)
2020

2121
**Suggestion:** Avoid using these.
2222

examples/content/usage/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Each individual page definition can have the following fields:
8484
| `category` | String | _(Optional)_ The name of a category to group this page into. This is used by Dactyl's built-in templates to organize the table of contents. |
8585
| `template` | String | _(Optional)_ The filename of a custom [Jinja][] HTML template to use when building this page for HTML, relative to the **template_path** in your config. |
8686
| `pdf_template` | String | _(Optional)_ The filename of a custom [Jinja][] HTML template to use when building this page for PDF, relative to the **template_path** in your config. |
87-
| `openapi_md_template_path` | String | _(Optional)_ Path to a folder containing [templates to be used for OpenAPI spec parsing](#openapi-spec-templates). If omitted, use the [built-in templates](dactyl/templates/). |
87+
| `openapi_md_template_path` | String | _(Optional)_ Path to a folder containing [templates to be used for OpenAPI spec parsing](openapi.html). If omitted, use the [built-in templates](templates.html). |
8888
| `parent` | String | _(Optional)_ The HTML filename of the page to treat as a parent of this one for purposes of hierarchy. If omitted, treat the page as a "top-level" page. |
8989
| ... | (Various) | Additional arbitrary key-value pairs as desired. These values can be used by templates or pre-processing. |
9090

examples/content/usage/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ By default, Dactyl looks for a config file named `dactyl-config.yml` in the curr
4242
$ dactyl_build -c path/to/alt-config.yml
4343
```
4444

45-
For more information on configuration, see the `default-config.yml` and the [examples](examples/) folder.
45+
For more information on configuration, see [Configuration](config.html) and the [examples](https://github.com/ripple/dactyl/tree/master/examples) folder.
4646

4747
## Specifying a Target
4848

releasenotes.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.15.1 Release Notes
2+
3+
This release fixes a bug that made "watch mode" and PDF builds not work on Windows because it assumed that `python3 -m http.server` would launch the simple Python HTTP server on those systems. The updated version should automatically detect the system's Python executable on all platforms.
4+
5+
This release also fixes some broken links in the updated documentation.
6+
17
# v0.15.0 Release Notes
28

39
This release improves OpenAPI spec parsing, adds a new formula for picking default filenames, overhauls Dactyl's own documentation, and fixes the following minor bugs:

0 commit comments

Comments
 (0)