themekit-js 1.47.2617 → 1.47.2919
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,7 +44,7 @@ function hasParam(children:any,name:string ){
|
|
|
44
44
|
}
|
|
45
45
|
if(params["background"]){
|
|
46
46
|
styles.push({"background":decodeURIComponent(params["background"])})
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
}
|
|
49
49
|
if(params["height"]){
|
|
50
50
|
styles.push({"height":params["height"]})
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-
|
|
1
|
+
import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-sZj3sT-k.js';
|
|
2
2
|
import { createLogger } from 'vite';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'shiki';
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-sZj3sT-k.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-sZj3sT-k.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -37152,9 +37152,6 @@ const imagePlugin = (md, { lazyLoading } = {}, base) => {
|
|
|
37152
37152
|
if (url && !EXTERNAL_URL_RE.test(url)) {
|
|
37153
37153
|
if (!/^\.?\//.test(url))
|
|
37154
37154
|
url = "./" + url;
|
|
37155
|
-
if (url.substring(0, 1) == "/" && base != null) {
|
|
37156
|
-
url = base + url.substring(1, url.length);
|
|
37157
|
-
}
|
|
37158
37155
|
}
|
|
37159
37156
|
if (url)
|
|
37160
37157
|
token.attrSet("src", decodeURIComponent(url));
|
|
@@ -46741,14 +46738,13 @@ function escapeHtml(string) {
|
|
|
46741
46738
|
|
|
46742
46739
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46743
46740
|
|
|
46744
|
-
var version = "1.47.
|
|
46741
|
+
var version = "1.47.2919";
|
|
46745
46742
|
|
|
46746
46743
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46747
46744
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
46748
46745
|
const siteData = resolveSiteDataByRoute(config.site, routePath);
|
|
46749
|
-
console.log("routePath:" + routePath);
|
|
46750
46746
|
const context = await render(routePath);
|
|
46751
|
-
|
|
46747
|
+
let { content, teleports } = await config.postRender?.(context) ?? context;
|
|
46752
46748
|
const pageName = sanitizeFileName(page.replace(/\//g, "_"));
|
|
46753
46749
|
const pageServerJsFileName = pageName + ".js";
|
|
46754
46750
|
const pageHash = pageToHashMap[pageName.toLowerCase()];
|
|
@@ -46841,6 +46837,8 @@ async function renderPage(render, config, page, result, appChunk, cssChunk, asse
|
|
|
46841
46837
|
themeCssList = '<link rel="stylesheet" type="text/css" href="' + siteData.base + '.themekit/assets/bootstrap3/dist/css/bootstrap.min.css"/>';
|
|
46842
46838
|
themeCssList += '<link rel="stylesheet" type="text/css" href="' + siteData.base + '.themekit/assets/changzhou/dist/css/style.css"/>';
|
|
46843
46839
|
}
|
|
46840
|
+
content = content.replace("./.themekit/dist", "");
|
|
46841
|
+
content = content.replace(".themekit/dist", "");
|
|
46844
46842
|
const html = `<!DOCTYPE html>
|
|
46845
46843
|
<html lang="${siteData.lang}" dir="${dir}" theme="${theme}">
|
|
46846
46844
|
<head>
|