Skip to content

Commit

Permalink
fix: broken docs pages link (#28)
Browse files Browse the repository at this point in the history
* refactor: move `ancestors` to `utils`

* fix: use relative URLs

* docs: fix tab order
  • Loading branch information
scarf005 authored Feb 23, 2024
1 parent 28566c6 commit 6f94b65
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import lume from "lume/mod.ts"
import codeHighlight from "lume/plugins/code_highlight.ts"
import relativeUrls from "lume/plugins/relative_urls.ts"
import { codeAutoLink } from "./auto_link.ts"

const site = lume({ src: "doc", prettyUrls: false })
Expand All @@ -9,5 +10,6 @@ site.copy("assets", "assets")
site
.use(codeHighlight())
.use(codeAutoLink())
.use(relativeUrls())

export default site
2 changes: 2 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions doc/_includes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default (
{ content, title, search, head }: Lume.Data,
{}: Lume.Helpers,
) => {
const nav = search.pages()
const nav = search.pages("category!=index")
.map((x) => /*html*/ `<a href="${x.url}">${x.title}</a>`).join("\n")

return /*html*/ `
Expand All @@ -27,7 +27,10 @@ export default (
<h1>
<a href="https://github.com/daangn/stackgraph">StackGraph</a>
</h1>
<nav>${nav}</nav>
<nav>
<a href="/index.html">StackGraph란</a>
${nav}
</nav>
</header>
<hr />
${content}
Expand Down
1 change: 1 addition & 0 deletions doc/index.page.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const category = "index"
export const title = "StackGraph란"

const readme = () =>
Expand Down
2 changes: 1 addition & 1 deletion doc/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Project } from "../deps/ts_morph.ts"

import { colors, hashRGB } from "../render/colors.ts"
import { denoProjectOption } from "../utils/project.ts"
import { ancestors } from "./ancestors.ts"
import { ancestors } from "../utils/ancestors.ts"
import { declDepsToGraph, getAllDecls, getDeclDeps } from "../graph/mod.ts"
import { encodeVSCodeURI } from "../graph/vscode_uri.ts"

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 6f94b65

Please sign in to comment.