From 92a9fe568584080f6221812334d62ab5fed028f4 Mon Sep 17 00:00:00 2001 From: James Brumond Date: Sat, 19 Aug 2023 16:04:07 -0700 Subject: [PATCH] fix base url issues --- .gitea/workflows/build-and-pubilsh.yaml | 8 ++++---- .gitea/workflows/build-and-test.yaml | 6 +++--- package-lock.json | 14 +++++++------- package.json | 2 +- src/build-files/helpers.ts | 2 +- src/build-files/markdown.ts | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build-and-pubilsh.yaml b/.gitea/workflows/build-and-pubilsh.yaml index 1fb3a23..7526437 100644 --- a/.gitea/workflows/build-and-pubilsh.yaml +++ b/.gitea/workflows/build-and-pubilsh.yaml @@ -2,10 +2,10 @@ name: Build and publish on: -# - workflow_dispatch - push: - branches: - - master +- workflow_dispatch + # push: + # branches: + # - master jobs: build-and-publish: diff --git a/.gitea/workflows/build-and-test.yaml b/.gitea/workflows/build-and-test.yaml index fe4415a..7601ad0 100644 --- a/.gitea/workflows/build-and-test.yaml +++ b/.gitea/workflows/build-and-test.yaml @@ -2,9 +2,9 @@ name: Build and test on: - # push: - # branches: - # - master + push: + branches: + - master pull_request: branches: - master diff --git a/package-lock.json b/package-lock.json index 396c90e..adb1216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@doc-utils/color-themes": "^0.2.0", "@doc-utils/jsonschema2markdown": "^0.1.1", - "@doc-utils/markdown2html": "^0.3.4", + "@doc-utils/markdown2html": "^0.3.5", "glob": "^10.2.3", "ical": "^0.8.0", "ical-generator": "^4.1.0", @@ -51,9 +51,9 @@ } }, "node_modules/@doc-utils/markdown2html": { - "version": "0.3.4", - "resolved": "https://gitea.jbrumond.me/api/packages/doc-utils/npm/%40doc-utils%2Fmarkdown2html/-/0.3.4/markdown2html-0.3.4.tgz", - "integrity": "sha512-zL3kay/zbrBJWGKIxGCyF+EXsafSxY1aN+miG+GOyml1neoOwd67vNIiE96KuEucf6rvuICPiYTjm3uJxkjd/g==", + "version": "0.3.5", + "resolved": "https://gitea.jbrumond.me/api/packages/doc-utils/npm/%40doc-utils%2Fmarkdown2html/-/0.3.5/markdown2html-0.3.5.tgz", + "integrity": "sha512-Z5zeHIRU7gyMu8taiNcQ2+FYD08184FGNzKBT2y4mtYTjSRBlFQH+trye6e14Mzc1wx9juoZ7KpysS1M6qe4sw==", "dependencies": { "bytefield-svg": "^1.6.1", "dompurify": "^2.3.6", @@ -2695,9 +2695,9 @@ } }, "@doc-utils/markdown2html": { - "version": "0.3.4", - "resolved": "https://gitea.jbrumond.me/api/packages/doc-utils/npm/%40doc-utils%2Fmarkdown2html/-/0.3.4/markdown2html-0.3.4.tgz", - "integrity": "sha512-zL3kay/zbrBJWGKIxGCyF+EXsafSxY1aN+miG+GOyml1neoOwd67vNIiE96KuEucf6rvuICPiYTjm3uJxkjd/g==", + "version": "0.3.5", + "resolved": "https://gitea.jbrumond.me/api/packages/doc-utils/npm/%40doc-utils%2Fmarkdown2html/-/0.3.5/markdown2html-0.3.5.tgz", + "integrity": "sha512-Z5zeHIRU7gyMu8taiNcQ2+FYD08184FGNzKBT2y4mtYTjSRBlFQH+trye6e14Mzc1wx9juoZ7KpysS1M6qe4sw==", "requires": { "bytefield-svg": "^1.6.1", "dompurify": "^2.3.6", diff --git a/package.json b/package.json index e956f0e..33fdce5 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "@doc-utils/color-themes": "^0.2.0", "@doc-utils/jsonschema2markdown": "^0.1.1", - "@doc-utils/markdown2html": "^0.3.5", + "@doc-utils/markdown2html": "^0.3.6", "glob": "^10.2.3", "ical": "^0.8.0", "ical-generator": "^4.1.0", diff --git a/src/build-files/helpers.ts b/src/build-files/helpers.ts index 5e07012..dfeadea 100644 --- a/src/build-files/helpers.ts +++ b/src/build-files/helpers.ts @@ -141,7 +141,7 @@ export function mustache_context(state: BuildState, page_url: string, metadata: export async function render_page(state: BuildState, in_file: string, out_file: string, out_url: OutFileURL, text: string, render_as_markdown: boolean, hash: string, frontmatter?: any) { if (render_as_markdown) { const opts = Object.assign({ }, state.conf.markdown, { - base_url: out_url.abs_url + // base_url: out_url.abs_url, }); text = await render_markdown_to_html(text, opts); diff --git a/src/build-files/markdown.ts b/src/build-files/markdown.ts index 3c6f795..a017fb3 100644 --- a/src/build-files/markdown.ts +++ b/src/build-files/markdown.ts @@ -34,7 +34,7 @@ export async function render_markdown_file(state: BuildState, in_file: string) { const out_file = await map_input_file_to_output_file(state, in_file, [ '.md', '.markdown' ], '.html'); const out_url = map_output_file_to_url(state, out_file); const { frontmatter, text, hash } = await read_text(in_file); - + if (frontmatter?.skip) { return; }