Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
handle links
Browse files Browse the repository at this point in the history
  • Loading branch information
eyworldwide committed Nov 16, 2020
1 parent 8a032fb commit 3bcd654
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
- Mobile optimization | Component system | Front-end Friendly

[Playground](https://oasis-engine.github.io/0.1/playground/)
[API](https://oasis-engine.github.io/0.1/api/globals.html)
[Playground](/0.1/playground/)
[API](/0.1/api/globals.html)
[Manual](${book.manual}README.md)
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@
// don't handle absolute path
return `<a href="${href}" target="_blank">${text}</a>`
}
else {
else if (href.indexOf('.md') > -1){
// handle relative path
href = `#${href.replace('.md', '')}`;
return `<a href="${href}">${text}</a>`
}
else {
return `<a href="${href}">${text}</a>`
}
}
}
},
Expand Down

0 comments on commit 3bcd654

Please sign in to comment.