Skip to content

Commit 87cc489

Browse files
authored
Merge pull request #33 from randombenj/bugfix/documentation-link
fix(web): link to documentation
2 parents a446614 + a3a907e commit 87cc489

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

web/src/pages/Docs.vue

+5-9
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ export default {
4747
this.versions = (await ProjectRepository.getVersions(
4848
this.$route.params.project
4949
)).map((version) => version.name)
50-
this.docURL = this.$route.params.location || ProjectRepository.getProjectDocsURL(
51-
this.$route.params.project,
52-
this.$route.params.version
53-
)
50+
// listen on anchor tag changes
51+
const component = this
52+
document.getElementById("docs")
53+
.contentWindow.addEventListener("hashchange", (event) =>
54+
component.load(event.newURL))
5455
},
5556
methods: {
5657
onChange() {
@@ -68,11 +69,6 @@ export default {
6869
location
6970
}
7071
})
71-
// load the correct documentation
72-
this.docURL = ProjectRepository.getProjectDocsURL(
73-
this.$route.params.project,
74-
this.$route.params.version
75-
)
7672
}
7773
}
7874
}

0 commit comments

Comments
 (0)