Skip to content

Commit

Permalink
feat: add edit on github link
Browse files Browse the repository at this point in the history
  • Loading branch information
NOBLES5E committed Jun 17, 2021
1 parent d22f9df commit 46045f9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
with:
command: install
args: mdbook-linkcheck
- uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-open-on-gh
- run: ./mdbook test
- run: ./mdbook build

Expand All @@ -44,5 +48,9 @@ jobs:
with:
command: install
args: mdbook-linkcheck
- uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-open-on-gh
- run: ./mdbook build
- run: ./ci/deploy.sh
6 changes: 6 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ title = "Bagua Tutorials"
description = "Guide on how to use Bagua, a deep learning distributed training framework"
author = "Kuaishou AI Platform & DS3 Lab <[email protected]>"

[preprocessor.open-git-repo]
command = "mdbook-open-on-gh"
renderer = ["html"]

[output.linkcheck]

[output.html]
follow-web-links = true
traverse-parent-directories = false
warning-policy = "error"
git-repository-url = "https://github.com/BaguaSys/tutorials"
additional-css = ["open-in.css"]
6 changes: 6 additions & 0 deletions open-in.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
footer {
font-size: 0.8em;
text-align: center;
border-top: 1px solid black;
padding: 5px 0;
}

0 comments on commit 46045f9

Please sign in to comment.