-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix readme code links to repo replace svelte-github-corner with svelte-zoo update deps pipe /api markdown through mdsvex instead of marked pnpm remove marked
- Loading branch information
Showing
12 changed files
with
81 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import json | ||
import os | ||
from glob import glob | ||
from subprocess import run | ||
|
||
|
||
# Update auto-generated API docs. Also tweak lazydocs's markdown output for | ||
# - prettier badges linking to source code on GitHub | ||
# - remove bold tags since they break inline code | ||
|
||
pkg = json.load(open("site/package.json")) | ||
route = "site/src/routes/api" | ||
|
||
for path in glob(f"{route}/*.md"): | ||
os.remove(path) | ||
|
||
run( | ||
f"lazydocs {pkg['name']} --output-path {route} " | ||
f"--no-watermark --src-base-url {pkg['repository']}/blob/main", | ||
shell=True, | ||
) | ||
|
||
for path in glob(f"{route}/*.md"): | ||
markdown = open(path).read() | ||
# remove <b> tags from generated markdown as they break inline code | ||
markdown = markdown.replace("<b>", "").replace("</b>", "") | ||
# improve style of badges linking to source code on GitHub | ||
markdown = markdown.replace( | ||
'src="https://img.shields.io/badge/-source-cccccc?style=flat-square"', | ||
'src="https://img.shields.io/badge/source-blue?style=flat" alt="source link"', | ||
) | ||
open(path, "w").write(markdown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters