Skip to content

Commit

Permalink
various path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Jan 10, 2022
1 parent 532bc61 commit 6f9a29c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
baseURL = "https://quartz.jzhao.xyz/"
#baseURL = "https://quartz.jzhao.xyz/"
baseURL = "https://jackyzha0.github.io/quartz/"
languageCode = "en-us"
googleAnalytics = "G-XYFD95KB4J"
pygmentsUseClasses = true
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3>Interactive Graph</h3>
}
</style>
<script>
const curPage = {{ strings.TrimRight "/" .Page.RelPermalink }}
const curPage = {{ strings.TrimRight "/" .Page.RelPermalink }}.replace({{strings.TrimRight "/" .Site.BaseURL }}, "")
const pathColors = {{$.Site.Data.graphConfig.paths}}
let depth = {{$.Site.Data.graphConfig.depth}}

Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
return template.content.firstChild
}

const pathRegex = /\.\.(\/\.\.)*/
document.addEventListener("DOMContentLoaded", () => {
[...document.getElementsByClassName("internal-link")]
.forEach(li => {
const linkDest = content[li.dataset.src]
const linkDest = content[li.dataset.src.replace(pathRegex, '')]
if (linkDest) {
const popoverElement = `<div class="popover">
<h3>${linkDest.title}</h3>
Expand Down

0 comments on commit 6f9a29c

Please sign in to comment.