vuepress-theme-uniapp-official 1.4.11 → 1.4.12

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.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -19,6 +19,10 @@ const changeLoaderOptions = (options, key = 'name') => {
19
19
  return options;
20
20
  };
21
21
 
22
+ const extensionMap = {
23
+ uts: 'ts'
24
+ }
25
+
22
26
  module.exports = (themeConfig, ctx, pluginAPI) => {
23
27
  pluginAPI.options.chainWebpack.add('assets-chunk-timestamp', (config, isServer) => {
24
28
  config.output.filename(`${nowString}/${config.output.get('filename')}`); //输出文件名
@@ -41,6 +45,11 @@ module.exports = (themeConfig, ctx, pluginAPI) => {
41
45
  })
42
46
 
43
47
  pluginAPI.options.extendMarkdown.add('vuepress-theme-uni-app-md-plugins', (md) =>{
48
+ config.options.highlight((str, lang) => {
49
+ const extension = extensionMap[lang]
50
+ return highlight(str, extension || lang)
51
+ })
52
+
44
53
  md.use(require('markdown-it-attrs'), {
45
54
  leftDelimiter: '#{',
46
55
  rightDelimiter: '}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuepress-theme-uniapp-official",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "uni-app official website theme for vuepress",
5
5
  "main": "index.js",
6
6
  "repository": {