Skip to content

Commit

Permalink
chore: update copyright year and add motto
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Jul 26, 2024
1 parent b4e1df4 commit 10f3175
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const config: Config = {
<p style="display: inline-flex; align-items: center;"><img style="height:20px;margin-right: 0.5rem;" src="/img/police.png" alt="police" height="20"/><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${
beian1.match(/\d+/)?.[0]
}" >${beian1}</a></p>
<p>Copyright © 2020 - PRESENT 愧怍 Built with Docusaurus.</p>
<p>Copyright © 2020 - ${new Date().getFullYear()} kuizuo. | Built with Docusaurus.</p>
`,
},
algolia: {
Expand Down Expand Up @@ -262,7 +262,7 @@ const config: Config = {
},
},
],
async function myPlugin(context, options) {
async function tailwindcssPlugin() {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
Expand All @@ -273,6 +273,39 @@ const config: Config = {
},
}
},
async function injectMotto() {
return {
name: 'docusaurus-motto',
injectHtmlTags() {
return {
headTags: [
{
tagName: 'script',
innerHTML: `
(${function () {
console.log(
`%c Kz Blog %c https://github.com/kuizuo/blog`,
'color: #fff; margin: 1em 0; padding: 5px 0; background: #12affa;',
'margin: 1em 0; padding: 5px 0; background: #efefef;',
)
const motto = `
This Webisite Powered By Kz Blog.
Written by Docusaurus, Coding with Love.
--------
Love what you do and do what you love.
`
if (document.firstChild?.nodeType !== Node.COMMENT_NODE) {
document.prepend(document.createComment(motto))
}
}.toString()})();`,
},
],
}
},
}
},
],
headTags: [
{
Expand Down

0 comments on commit 10f3175

Please sign in to comment.