Skip to content

Commit

Permalink
Merge pull request #16 from lgeiger/fix-headerlinks
Browse files Browse the repository at this point in the history
Fix headerlink CSS class
  • Loading branch information
greenape authored Feb 24, 2020
2 parents 37bb3ce + 7b21f85 commit e8d62ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mknotebooks/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def on_page_read_source(self, page, config):
exporter = config["notebook_exporter"]
body, resources = exporter.from_notebook_node(nb)

# nbconvert uses the anchor-link class, convert it to the mkdocs convention
body = body.replace('class="anchor-link"', 'class="headerlink"')

if self.config["write_markdown"]:
pathlib.Path(page.file.abs_dest_path).parent.mkdir(
parents=True, exist_ok=True
Expand Down

0 comments on commit e8d62ec

Please sign in to comment.