Preface#
After installing Kami, the frontend of mx-space, I found that the copyright statement at the bottom of the website is © 2020-2023
. After searching through the documentation for a while, I couldn't find where it can be changed.
I had to look at the source code and found that the year setting for this thing is actually hard-coded and there is no configuration option for it.
So I had to modify it myself and then recompile it.
Modification#
Find the file kami/src/components/layouts/BasicLayout/Footer/index.tsx
in the Kami source code directory, and find the following code around line 53:
<p>
© {thisYear !== 2020 && '2020-'}
{thisYear}{' '}
<a href={kamiConfig.site.footer.homePage ?? '#'} target="_blank">
{name}
</a>
.{' '}
<span title={`${motto.content} -- ${motto.author}`}>
{motto.content}
</span>
</p>
Replace © {thisYear !== 2020 && '2020-'}
with the current year.
When I wrote this article, it was the year 2023, so the modified content should be © {thisYear !== 2023 && '2023-'}
.
After the modification, execute the following commands in the Kami repository directory to rebuild and restart the server:
pnpm build
pnpm prod:pm2
After completion, clear the browser cache, reopen the page, and the bottom of the page will show © 2023
.
References#
- [GitHub] mx-space/kami: https://github.com/mx-space/kami
This article is synchronized and updated to xLog by Mix Space.
The original link is https://bdovo.cc/posts/experiences/Edit_Copyright_in_mx-space