themekit-js 1.49.2616 → 1.49.2618

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.
@@ -9,11 +9,13 @@
9
9
  a.btn{
10
10
  text-decoration:none !important;
11
11
  border-radius: 28px;
12
- padding: 0 12px;
12
+ padding: 0 8px;
13
13
  line-height: 28px;
14
14
  font-size: 14px;
15
+
16
+
15
17
  }
16
- a.btn .icon{ display: inline-flex; vertical-align: middle; margin-left: -6px; margin-right: 2px;margin-top: -2px; }
18
+ a.btn .icon{ display: inline-flex; vertical-align: middle; border-radius: 100px; margin-left: -6px; margin-right: 2px;margin-top: -2px; }
17
19
  .btn:active {
18
20
  transition: color 0.1s, border-color 0.1s, background-color 0.1s;
19
21
  }
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-DVm7krPI.js';
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-DQeart1n.js';
2
2
  import { createLogger } from 'vite';
3
3
  import 'path';
4
4
  import 'shiki';
@@ -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-DVm7krPI.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-DVm7krPI.js';
3
+ import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-DQeart1n.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-DQeart1n.js';
5
5
  import path from 'path';
6
6
  import 'crypto';
7
7
  import 'module';
@@ -38219,6 +38219,33 @@ function clearCache(file) {
38219
38219
  file = JSON.stringify({ file }).slice(1);
38220
38220
  cache$1.find((_, key) => key.endsWith(file) && cache$1.delete(key));
38221
38221
  }
38222
+ async function seedunk_mdparser(src) {
38223
+ const regexmd = new RegExp(/\]\((.+?)\)/g);
38224
+ let matchmd;
38225
+ let plain = src;
38226
+ while ((matchmd = regexmd.exec(src)) !== null) {
38227
+ if (matchmd[1].indexOf("?include=markdown") >= 0) {
38228
+ const mdresponse = await axios.get(matchmd[1]);
38229
+ if (mdresponse.status == 200) {
38230
+ let mdraw = mdresponse.data;
38231
+ let imgmatch;
38232
+ const imgregex = new RegExp(/\!\[(.+?)\)/g);
38233
+ while ((imgmatch = imgregex.exec(mdraw)) !== null) {
38234
+ const args = imgmatch[1].split("(");
38235
+ if (args.length > 1) {
38236
+ const imgsrc = args[1];
38237
+ if (imgsrc.indexOf("http") < 0 && imgsrc.substring(0, 1) != "/") {
38238
+ const parsedPath = path$q.parse(matchmd[1]);
38239
+ mdraw = mdraw.replace(imgsrc, parsedPath.dir + "/" + imgsrc);
38240
+ }
38241
+ }
38242
+ }
38243
+ plain = plain.replace(matchmd[1], matchmd[1] + ")\r\n" + mdraw);
38244
+ }
38245
+ }
38246
+ }
38247
+ return plain;
38248
+ }
38222
38249
  async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild = false, base = "/", includeLastUpdatedData = false, cleanUrls = false, siteConfig = null) {
38223
38250
  const md = await createMarkdownRenderer(
38224
38251
  srcDir,
@@ -38335,33 +38362,7 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
38335
38362
  const blockType = blockTypeRegex.exec(block);
38336
38363
  let blockContent = "";
38337
38364
  if (blockType == null) ; else if (blockType[0] == "Doc" || blockType[0] == "Github" || blockType[0] == "DocWithCatalog") {
38338
- blockContent = md.render(block, env);
38339
- } else if (blockType[0] == "Media") {
38340
- const regex2 = new RegExp(/\]\((.+?)\.md\)/g);
38341
- let match3;
38342
- let plain = block;
38343
- while ((match3 = regex2.exec(block)) !== null) {
38344
- const md2 = match3[1] + ".md";
38345
- const mdresponse = await axios.get(md2);
38346
- if (mdresponse.status == 200) {
38347
- let mdraw = mdresponse.data;
38348
- let imgmatch;
38349
- const imgregex = new RegExp(/\!\[(.+?)\)/g);
38350
- while ((imgmatch = imgregex.exec(mdraw)) !== null) {
38351
- const args = imgmatch[1].split("(");
38352
- if (args.length > 1) {
38353
- const imgsrc = args[1];
38354
- if (imgsrc.indexOf("http") < 0 && imgsrc.substring(0, 1) != "/") {
38355
- mdraw = mdraw.replace(imgsrc, md2 + "/../" + imgsrc);
38356
- }
38357
- }
38358
- }
38359
- console.log("------------------------");
38360
- console.log(mdraw);
38361
- plain = plain.replace(md2, md2 + ")\r\n" + mdraw);
38362
- }
38363
- }
38364
- blockContent = md.render(plain, env);
38365
+ blockContent = md.render(await seedunk_mdparser(block), env);
38365
38366
  } else if (blockType[0] == "HTML") {
38366
38367
  blockContent = encodeURIComponent(block);
38367
38368
  }
@@ -38379,7 +38380,7 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
38379
38380
  blocks.push(blockItem);
38380
38381
  }
38381
38382
  }
38382
- const html = md.render(src, env);
38383
+ const html = md.render(await seedunk_mdparser(src), env);
38383
38384
  const {
38384
38385
  frontmatter = {},
38385
38386
  headers = [],
@@ -46772,7 +46773,7 @@ function escapeHtml(string) {
46772
46773
 
46773
46774
  var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
46774
46775
 
46775
- var version = "1.49.2616";
46776
+ var version = "1.49.2618";
46776
46777
 
46777
46778
  async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
46778
46779
  const routePath = `/${page.replace(/\.md$/, "")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "themekit-js",
3
- "version": "1.49.2616",
3
+ "version": "1.49.2618",
4
4
  "description": "基于VitePress开发的Markdown静态网站生成器",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@8.15.6",