Skip to content

Commit

Permalink
optimize: add docusaurus-plugin-includes (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly authored Oct 31, 2023
1 parent 0cc71c4 commit 4b33dd7
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 14 deletions.
51 changes: 39 additions & 12 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ const config = {
scripts: [
{ src: '//g.alicdn.com/mamba/assets/0.0.19/mse-arc-ui.min.js' },
{
src: '//g.alicdn.com/alilog/mlog/aplus_v2.js',
id: 'beacon-aplus',
exparams: 'clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx',
},
{
src: '//g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js',
},
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-YHS75WKFBR',
src: 'https://www.googletagmanager.com/gtag/js?id=G-0YDFJ7LX7F',
async: true,
},
],
Expand All @@ -61,9 +53,44 @@ const config = {
href: '//g.alicdn.com/mamba/assets/0.0.19/mse-arc-ui.min.css',
},
],
plugins: [
'docusaurus-plugin-sass',

plugins: ['docusaurus-plugin-sass',
['docusaurus-plugin-includes',
{
injectedHtmlTags: {
headTags: [
{
tagName: 'meta',
attributes: {
name: 'aes-config',
content: 'pid=xux-opensource&user_type=101&uid=&username=&dim10=nacos',
},
},
],
preBodyTags: [
{
tagName: 'script',
attributes: {
src: '//g.alicdn.com/alilog/mlog/aplus_v2.js',
id: 'beacon-aplus',
exparams: 'clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx',
},
},
{
tagName: 'script',
attributes: {
src: '//g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js',
},
},
{
tagName: 'script',
attributes: {
src: '//hm.baidu.com/hm.js?e3a5cec56ef8619cf9d7c2abebd509e3',
},
}
],
}
},
]
],
presets: [
[
Expand Down
72 changes: 70 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@types/react-dom": "^18.2.7",
"classnames": "^2.3.2",
"clsx": "^1.2.1",
"docusaurus-plugin-includes": "^1.1.4",
"docusaurus-plugin-sass": "^0.2.5",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
Expand Down

0 comments on commit 4b33dd7

Please sign in to comment.