Merge pull request #145 from YoungYo/master

发布文章时,支持自定义摘要;markdown支持多行公式
master
linhaojun857 3 years ago committed by GitHub
commit f1ba975d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,6 +28,7 @@ CREATE TABLE `t_article` (
`category_id` int NULL DEFAULT NULL COMMENT '文章分类',
`article_cover` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文章缩略图',
`article_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '标题',
`article_abstract` varchar(500) DEFAULT NULL COMMENT '文章摘要如果该字段为空默认取文章的前500个字符作为摘要',
`article_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '内容',
`is_top` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否置顶 0否 1是',
`is_featured` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否推荐 0否 1是',

@ -26,6 +26,8 @@ public class Article {
private String articleTitle;
private String articleAbstract;
private String articleContent;
private Integer isTop;

@ -22,6 +22,8 @@ public class ArticleAdminViewDTO {
private String articleTitle;
private String articleAbstract;
private String articleContent;
private String articleCover;

@ -26,6 +26,9 @@ public class ArticleVO {
@ApiModelProperty(name = "articleContent", value = "文章内容", required = true, dataType = "String")
private String articleContent;
@ApiModelProperty(name = "articleAbstract", value = "文章摘要", dataType = "String")
private String articleAbstract;
@ApiModelProperty(name = "articleCover", value = "文章缩略图", dataType = "String")
private String articleCover;

@ -63,7 +63,7 @@
category_id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -79,6 +79,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -100,7 +101,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -115,6 +116,7 @@
user_id,
category_id,
article_cover,
article_abstract,
article_title,
article_content,
is_top,
@ -138,7 +140,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -154,6 +156,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -194,6 +197,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -217,7 +221,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -233,6 +237,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -256,7 +261,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -272,6 +277,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -295,7 +301,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -311,6 +317,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -333,7 +340,7 @@
SELECT a.id AS id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -349,6 +356,7 @@
category_id,
article_cover,
article_title,
article_abstract,
article_content,
is_top,
is_featured,
@ -372,7 +380,7 @@
category_id,
article_cover,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
is_top,
is_featured,
status,
@ -397,7 +405,7 @@
<select id="listArchives" resultType="com.aurora.model.dto.ArticleCardDTO">
SELECT id,
article_title,
SUBSTR(article_content, 1, 500) AS article_content,
if(article_abstract is null or article_abstract = '', SUBSTR(article_content, 1, 500), article_abstract) AS article_content,
create_time
FROM t_article
WHERE is_delete = 0

@ -8,11 +8,13 @@
"name": "aurora-admin",
"version": "0.1.0",
"dependencies": {
"@iktakahiro/markdown-it-katex": "^4.0.1",
"axios": "^0.27.2",
"core-js": "^3.8.3",
"dayjs": "^1.11.4",
"element-ui": "^2.15.8",
"image-conversion": "^2.1.1",
"markdown-it": "^13.0.1",
"mavon-editor": "^2.9.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
@ -1715,6 +1717,14 @@
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@iktakahiro/markdown-it-katex": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/@iktakahiro/markdown-it-katex/-/markdown-it-katex-4.0.1.tgz",
"integrity": "sha512-kGFooO7fIOgY34PSG8ZNVsUlKhhNoqhzW2kq94TNGa8COzh73PO4KsEoPOsQVG1mEAe8tg7GqG0FoVao0aMHaw==",
"dependencies": {
"katex": "^0.12.0"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
@ -3077,6 +3087,11 @@
"integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
"dev": true
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/array-flatten": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-2.1.2.tgz",
@ -5938,6 +5953,22 @@
"graceful-fs": "^4.1.6"
}
},
"node_modules/katex": {
"version": "0.12.0",
"resolved": "https://registry.npmmirror.com/katex/-/katex-0.12.0.tgz",
"integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==",
"dependencies": {
"commander": "^2.19.0"
},
"bin": {
"katex": "cli.js"
}
},
"node_modules/katex/node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",
@ -5990,6 +6021,14 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"node_modules/linkify-it": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz",
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
"dependencies": {
"uc.micro": "^1.0.1"
}
},
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
@ -6304,6 +6343,29 @@
"node": ">=8"
}
},
"node_modules/markdown-it": {
"version": "13.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.1.tgz",
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
"dependencies": {
"argparse": "^2.0.1",
"entities": "~3.0.1",
"linkify-it": "^4.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it/node_modules/entities": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
"engines": {
"node": ">=0.12"
}
},
"node_modules/mavon-editor": {
"version": "2.9.0",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-2.9.0.tgz",
@ -6330,6 +6392,11 @@
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
@ -9068,6 +9135,11 @@
"node": ">= 0.6"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@ -11232,6 +11304,14 @@
"@hapi/hoek": "^9.0.0"
}
},
"@iktakahiro/markdown-it-katex": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/@iktakahiro/markdown-it-katex/-/markdown-it-katex-4.0.1.tgz",
"integrity": "sha512-kGFooO7fIOgY34PSG8ZNVsUlKhhNoqhzW2kq94TNGa8COzh73PO4KsEoPOsQVG1mEAe8tg7GqG0FoVao0aMHaw==",
"requires": {
"katex": "^0.12.0"
}
},
"@jridgewell/gen-mapping": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
@ -12377,6 +12457,11 @@
"integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
"dev": true
},
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"array-flatten": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-2.1.2.tgz",
@ -14692,6 +14777,21 @@
"universalify": "^2.0.0"
}
},
"katex": {
"version": "0.12.0",
"resolved": "https://registry.npmmirror.com/katex/-/katex-0.12.0.tgz",
"integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==",
"requires": {
"commander": "^2.19.0"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}
}
},
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",
@ -14735,6 +14835,14 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
"linkify-it": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz",
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
"requires": {
"uc.micro": "^1.0.1"
}
},
"loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
@ -14989,6 +15097,25 @@
"semver": "^6.0.0"
}
},
"markdown-it": {
"version": "13.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.1.tgz",
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
"requires": {
"argparse": "^2.0.1",
"entities": "~3.0.1",
"linkify-it": "^4.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"dependencies": {
"entities": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
}
}
},
"mavon-editor": {
"version": "2.9.0",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-2.9.0.tgz",
@ -15012,6 +15139,11 @@
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
},
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
@ -17150,6 +17282,11 @@
"mime-types": "~2.1.24"
}
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
"unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",

@ -8,11 +8,13 @@
"deploy": "node deploy.js"
},
"dependencies": {
"@iktakahiro/markdown-it-katex": "^4.0.1",
"axios": "^0.27.2",
"core-js": "^3.8.3",
"dayjs": "^1.11.4",
"element-ui": "^2.15.8",
"image-conversion": "^2.1.1",
"markdown-it": "^13.0.1",
"mavon-editor": "^2.9.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",

@ -24,6 +24,7 @@ import 'mavon-editor/dist/css/index.css'
import VueCalendarHeatmap from 'vue-calendar-heatmap'
import tagCloud from './components/tag-cloud'
import dayjs from 'dayjs'
import Md_Katex from '@iktakahiro/markdown-it-katex'
Vue.config.productionTip = false
Vue.prototype.config = config
@ -34,6 +35,7 @@ Vue.use(VueCalendarHeatmap)
Vue.use(VueAxios, axios)
Vue.component('v-chart', ECharts)
Vue.prototype.$moment = dayjs
mavonEditor.markdownIt.set({}).use(Md_Katex);
Vue.filter('date', function (value, formatStr = 'YYYY-MM-DD') {
return dayjs(value).format(formatStr)

@ -127,6 +127,9 @@
<el-form-item label="访问密码" v-if="article.status == 2">
<el-input v-model="article.password" placeholder="请填写文章访问密码" />
</el-form-item>
<el-form-item label="文章摘要">
<el-input type="textarea" autosize="true" v-model="article.articleAbstract" placeholder="默认取文章前500个字符" />
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="addOrEdit = false"> </el-button>
@ -183,6 +186,7 @@ export default {
id: null,
articleTitle: this.$moment(new Date()).format('YYYY-MM-DD'),
articleContent: '',
articleAbstract: '',
articleCover: '',
categoryName: null,
tagNames: [],

@ -8,13 +8,22 @@
"name": "aurora-blog",
"version": "0.1.0",
"dependencies": {
"@iktakahiro/markdown-it-katex": "^4.0.1",
"axios": "^0.27.2",
"core-js": "^3.8.3",
"element-plus": "^2.2.9",
"js-cookie": "^3.0.1",
"markdown-it": "^13.0.1",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^3.0.0",
"markdown-it-emoji": "^2.0.2",
"markdown-it-footnote": "^3.0.3",
"markdown-it-ins": "^3.0.1",
"markdown-it-katex-external": "^1.0.0",
"markdown-it-mark": "^3.0.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"mavon-editor": "^3.0.1",
"mitt": "^3.0.0",
"normalize.css": "^8.0.1",
"nprogress": "^0.2.0",
@ -1797,6 +1806,14 @@
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@iktakahiro/markdown-it-katex": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/@iktakahiro/markdown-it-katex/-/markdown-it-katex-4.0.1.tgz",
"integrity": "sha512-kGFooO7fIOgY34PSG8ZNVsUlKhhNoqhzW2kq94TNGa8COzh73PO4KsEoPOsQVG1mEAe8tg7GqG0FoVao0aMHaw==",
"dependencies": {
"katex": "^0.12.0"
}
},
"node_modules/@intlify/core-base": {
"version": "9.1.10",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.1.10.tgz",
@ -6246,6 +6263,11 @@
"node": ">=4"
}
},
"node_modules/cssfilter": {
"version": "0.0.10",
"resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz",
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
},
"node_modules/csso": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
@ -8474,6 +8496,22 @@
"graceful-fs": "^4.1.6"
}
},
"node_modules/katex": {
"version": "0.12.0",
"resolved": "https://registry.npmmirror.com/katex/-/katex-0.12.0.tgz",
"integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==",
"dependencies": {
"commander": "^2.19.0"
},
"bin": {
"katex": "cli.js"
}
},
"node_modules/katex/node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",
@ -8910,16 +8948,51 @@
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it-abbr": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz",
"integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg=="
},
"node_modules/markdown-it-container": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz",
"integrity": "sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw=="
},
"node_modules/markdown-it-emoji": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz",
"integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ=="
},
"node_modules/markdown-it-footnote": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"node_modules/markdown-it-ins": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz",
"integrity": "sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw=="
},
"node_modules/markdown-it-katex-external": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-katex-external/-/markdown-it-katex-external-1.0.0.tgz",
"integrity": "sha512-vYZCxFH3FW9ViL/00FrcxxR/l8NiX2yXDtFA7hUEntzs+UII8TfdpjGCYRLUrgetHqZoJLMYO0Fs+u0H24nlWQ=="
},
"node_modules/markdown-it-mark": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
},
"node_modules/markdown-it-sub": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz",
"integrity": "sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q=="
},
"node_modules/markdown-it-sup": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz",
"integrity": "sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ=="
},
"node_modules/markdown-it/node_modules/entities": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz",
@ -8928,6 +9001,14 @@
"node": ">=0.12"
}
},
"node_modules/mavon-editor": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.1.tgz",
"integrity": "sha512-973cYCwv+AB+fcecsU6Ua6UXATxDMaY0Q7QzKQ/GmRW1sg+3DolZDnCGXth7XHDgrmqKTO57N42fVYujt0wfFw==",
"dependencies": {
"xss": "^1.0.10"
}
},
"node_modules/mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.14.tgz",
@ -14050,6 +14131,26 @@
}
}
},
"node_modules/xss": {
"version": "1.0.14",
"resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.14.tgz",
"integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==",
"dependencies": {
"commander": "^2.20.3",
"cssfilter": "0.0.10"
},
"bin": {
"xss": "bin/xss"
},
"engines": {
"node": ">= 0.10.0"
}
},
"node_modules/xss/node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
@ -15338,6 +15439,14 @@
"@hapi/hoek": "^9.0.0"
}
},
"@iktakahiro/markdown-it-katex": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/@iktakahiro/markdown-it-katex/-/markdown-it-katex-4.0.1.tgz",
"integrity": "sha512-kGFooO7fIOgY34PSG8ZNVsUlKhhNoqhzW2kq94TNGa8COzh73PO4KsEoPOsQVG1mEAe8tg7GqG0FoVao0aMHaw==",
"requires": {
"katex": "^0.12.0"
}
},
"@intlify/core-base": {
"version": "9.1.10",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.1.10.tgz",
@ -18778,6 +18887,11 @@
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
"dev": true
},
"cssfilter": {
"version": "0.0.10",
"resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz",
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
},
"csso": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
@ -20553,6 +20667,21 @@
"universalify": "^2.0.0"
}
},
"katex": {
"version": "0.12.0",
"resolved": "https://registry.npmmirror.com/katex/-/katex-0.12.0.tgz",
"integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==",
"requires": {
"commander": "^2.19.0"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}
}
},
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",
@ -20914,16 +21043,59 @@
}
}
},
"markdown-it-abbr": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz",
"integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg=="
},
"markdown-it-container": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz",
"integrity": "sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw=="
},
"markdown-it-emoji": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz",
"integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ=="
},
"markdown-it-footnote": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"markdown-it-ins": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz",
"integrity": "sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw=="
},
"markdown-it-katex-external": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-katex-external/-/markdown-it-katex-external-1.0.0.tgz",
"integrity": "sha512-vYZCxFH3FW9ViL/00FrcxxR/l8NiX2yXDtFA7hUEntzs+UII8TfdpjGCYRLUrgetHqZoJLMYO0Fs+u0H24nlWQ=="
},
"markdown-it-mark": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
},
"markdown-it-sub": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz",
"integrity": "sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q=="
},
"markdown-it-sup": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz",
"integrity": "sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ=="
},
"mavon-editor": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.1.tgz",
"integrity": "sha512-973cYCwv+AB+fcecsU6Ua6UXATxDMaY0Q7QzKQ/GmRW1sg+3DolZDnCGXth7XHDgrmqKTO57N42fVYujt0wfFw==",
"requires": {
"xss": "^1.0.10"
}
},
"mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.14.tgz",
@ -25058,6 +25230,22 @@
"dev": true,
"requires": {}
},
"xss": {
"version": "1.0.14",
"resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.14.tgz",
"integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==",
"requires": {
"commander": "^2.20.3",
"cssfilter": "0.0.10"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}
}
},
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",

@ -8,6 +8,7 @@
"deploy": "node deploy.js"
},
"dependencies": {
"@iktakahiro/markdown-it-katex": "^4.0.1",
"axios": "^0.27.2",
"core-js": "^3.8.3",
"element-plus": "^2.2.9",

@ -13,6 +13,7 @@ export default function markdownToHtml(content: any) {
.use(require('markdown-it-footnote')) // 脚注插件
.use(require('markdown-it-abbr')) // 缩写插件
.use(require('markdown-it-ins')) // 插入插件
.use(require('markdown-it-mark')) // 标记插件
.use(require('markdown-it-mark')) // 标记插件
.use(require('@iktakahiro/markdown-it-katex'))
return md.render(content)
}

Loading…
Cancel
Save