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 committed 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
@@ -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
Expand Up @@ -855,8 +855,10 @@
"https://deno.land/x/lume@v2.0.3/plugins/code_highlight.ts": "bd4ef987c4fd05c1c585238a490f9f56d48daefd4748b4647219575b8e1d42c0",
"https://deno.land/x/lume@v2.0.3/plugins/json.ts": "f6429bbd865e3666ef3385fd205fcc92df02ca2c0f74f20baa5c0798a81e1642",
"https://deno.land/x/lume@v2.0.3/plugins/markdown.ts": "7f4f2cff511d81ea39fcea3d3b39dc34c79a952f911398eac919ced25a5e4365",
"https://deno.land/x/lume@v2.0.3/plugins/modify_urls.ts": "f2319fd98d60578fe78f4c197aa5d98785234732bbd2287e78a47d15d4a2b641",
"https://deno.land/x/lume@v2.0.3/plugins/modules.ts": "19a66398a5494f506458e48b8443a7c4700b7577e8fcc0818c39b1d0530c8950",
"https://deno.land/x/lume@v2.0.3/plugins/paginate.ts": "e86617ec1ad491c86bc4866db41f070a6b393e8c2ac94ed28a51ca309f88477d",
"https://deno.land/x/lume@v2.0.3/plugins/relative_urls.ts": "279e7c54a1dba9945c7ac742360cca386818e990b6b609b2fda3b4ca4792bdac",
"https://deno.land/x/lume@v2.0.3/plugins/search.ts": "8ec3a8f082b8ff1532bbe8f8bf76dfaa2d0feab7c2ec5c824d0ccc044c26f640",
"https://deno.land/x/lume@v2.0.3/plugins/toml.ts": "60191e1e8fd0922def0b3f0eaad13988217511571a54659481759db4b0ca4f82",
"https://deno.land/x/lume@v2.0.3/plugins/url.ts": "3d298886cb16e1110d427d2f257de6c2ae0da3cd7076b6abcbbd41e7536ed094",
Expand Down
7 changes: 5 additions & 2 deletions doc/_includes/base.ts
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
@@ -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
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.