mckero
f3effb18f6
更新 Profile.astro
2026-01-21 07:33:13 +08:00
mckero
7f52d576ec
更新 Footer.astro
2026-01-12 17:37:14 +08:00
mckero
af0a425c72
fix: 修复 Umami v3 API 浏览量统计
2025-11-21 12:27:49 +08:00
mckero
c4ea964119
修改twikoo链接
2025-10-22 14:35:51 +08:00
mckero
58e4fd4f07
Update Twikoo script source URL
2025-10-19 10:20:00 +08:00
mckero
2bdad30f30
更新 Twikoo.astro
2025-10-18 22:51:47 +08:00
mckero
39adbf2a69
更新 Twikoo.astro
2025-10-12 16:30:59 +08:00
mckero
82fb555813
把Twikoo.astro中的链接替换阿里云
...
https://registry.npmmirror.com/twikoo/1.6.44/files/dist/twikoo.min.js
2025-10-12 15:48:20 +08:00
mckero
db42e3eabd
Update Twikoo script source URL
2025-10-12 12:59:52 +08:00
mckero
3956bc800c
更换链接
...
https://registry.npmmirror.com
2025-10-12 12:57:39 +08:00
mckero
6fc7a1ed15
解决评论操作会回到文章顶部,修改链接
...
解决评论操作会回到文章顶部
见 issue #721,Twikoo 加了一个href="#",这是为了防止回复按钮在某些主题(如 VuePress)下被识别为不可点击的链接而加的,不能被官方仓库删除。但是 Fuwari 正是这个href="#"导致了问题。
我去 Twikoo 项目提了个 issue 也问了一下,回答说“拉 twikoo 的源代码,全局替换掉href="#",然后编译一个自己的 js 出来用。”
那,还能怎么办,编译呗。用官方 js 的话不仅评论相关功能会出问题,就连登录管理页面输入密码回车,以及退出管理页面都能弹射到文章顶部,真的是弹射…
步骤:
Fork 官方项目到自己分支
仓库 Clone 到本地
全局删除href="#"
编译出 js 文件
编译流程:
# 安装 yarn(如未安装)
sudo npm install -g yarn
# 安装依赖
yarn install
# 搜索并删除 twikoo 源码中的 href="#"(建议用编辑器全局替换)
# 比如 VS Code 搜索全项目替换为 "javascript:void(0)"或删除,我是都删除了
# 编译(非腾讯云用 twikoo.min.js,全部文件输出在./dist)
yarn build
编译之后本地拉取最新上游更新(可选)
git remote add upstream https://github.com/twikoojs/twikoo.git
git fetch upstream
git merge upstream/main
编译之后的文件上传至自己仓库的 releases 里,版本号为 tag 名(如1.6.44)方便回找和升级。但是 releases 只供下载不提供 CDN,于是再上传一份到 GitHub 仓库中拿到 CDN。
于是我的Twikoo.astro最终版本:
Twikoo.astro
---
import { commentConfig } from '@/config'
interface Props {
path: string
}
const config = {
...commentConfig.twikoo,
el: '#tcomment',
path: Astro.props.path,
}
---
<div id="tcomment"></div>
<script define:vars={{ config }}>
function loadTwikoo() {
// 动态加载 Twikoo 脚本,并在加载完成后执行 twikoo.init
const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/gh/MicroSic/twikoo-magic/twikoo/twikoo.min.js '; // 去除腾讯云,删除所有href="#"的1.6.44版本
script.defer = true;
script.onload = () => {
if (window.twikoo) {
window.twikoo.init(config);
}
};
// script.onerror = () => {
// console.error('Twikoo script load failed');
// };
document.body.appendChild(script);
}
document.addEventListener("loadComment", loadTwikoo, { once: true }); // 监听加载评论事件,但是我们只能监听一次,从而避免多次触发。
</script>
2025-10-12 12:55:18 +08:00
mckero
f27ae7b64c
Twikoo.astro更换其中的链接。
2025-10-08 07:29:25 +08:00
mckero
b537dd0f7f
修bug
2025-10-07 08:36:53 +00:00
mckero
beb0b9e640
把giscus评论系统改成twikoo
2025-10-07 07:34:27 +00:00
mckero
d37d28b9b3
Update Footer.astro
...
© 2025 MC_Kero. All Rights Reserved. / RSS / Sitemap / 萌ICP备20250659号
Powered by Astro & Fuwari
变
© 2025 MC_Kero. All Rights Reserved. / RSS / Sitemap
萌ICP备20250659号
Powered by Astro & Fuwari
2025-10-06 18:31:36 +08:00
mckero
1481a4687d
Update Footer.astro
...
修改萌ICP备20250659号
2025-10-06 18:27:46 +08:00
mckero
16c462453a
删除音乐播放器,因为BUG太多了!
2025-09-30 20:57:13 +08:00
mckero
e2d9d41e95
修复音乐播放器bug
...
bug
现在还有一个超级无敌的bug,那就是展开音乐列表的时候,会把整个网页都给拉伸一下。这应该是因为?尝试了很多次,但都是展开之后,音乐播放器都不能自由滚动😓 ,这主要是因为我改变了本来aplayer的样式,因为它一直出现两个播放器,生成不一样的aplayer之后,原生的列表也变了。
所以我决定回复原来的aplayer引用,改为销毁一个音乐播放器
一度变成了
内容来自其他网站。
2025-09-28 13:22:50 +08:00
mckero
2b1b374321
Refactor SideBar.astro for improved syntax
...
修bug,
div id="music" class="flex flex-col w-full gap-4">
2025-09-16 11:46:56 +08:00
mckero
c7ee2e02ae
Update playlist ID in APlayer.svelte歌单ID
...
420944487
2025-09-16 10:28:56 +08:00
mckero
02542654de
音乐播放器
2025-09-15 21:47:01 +08:00
mckero
87c41cd53e
添加文章最后更新时间
2025-09-05 16:11:17 +08:00
mckero
32d6c38234
在标签页添加系列
2025-08-26 06:23:48 +00:00
mckero
3b4d3195bd
添加系列栏
2025-08-26 02:50:07 +00:00
mckero
3dc146c04b
尝试给网站添加umami浏览量显示
2025-08-18 14:09:08 +08:00
MCKero6423
e6b716bad7
Update Footer.astro <a href=" https://icp.gov.moe/?keyword=20250659 " target="_blank">萌ICP备20250659号</a>
2025-08-15 11:53:01 +08:00
MCKero6423
c704597905
Rename Profile.astro.txt to Profile.astro
2025-08-13 11:14:12 +08:00
MCKero6423
cf1421beb5
Delete src/components/widget/Profile.astro
2025-08-13 11:13:48 +08:00
MCKero6423
11212f6f97
Add files via upload
2025-08-13 11:10:16 +08:00
MCKero6423
f39f1b52fa
Add files via upload
2025-08-13 11:09:37 +08:00
MCKero6423
1a67b8f430
Add files via upload
2025-08-13 00:51:47 +08:00
MCKero6423
cd5ea0eea2
Add files via upload
2025-08-13 00:45:03 +08:00
MCKero6423
86cabacf25
Add files via upload
2025-08-12 22:11:18 +08:00
MCKero6423
6a8818b9e9
Add files via upload
2025-08-12 21:37:21 +08:00
rushii
ec4dbfd1e8
fix(TOC): hide active overlay when no sections active ( #586 )
...
* fix(TOC): hide active overlay when none active
* fix indentation
2025-08-09 11:14:35 +08:00
adaxiik
2b9e9ff903
fix: missing toc if base url is set ( #550 )
...
* fix missing toc if base url is set
* sort imports
2025-07-27 12:13:17 +08:00
haappi and L4Ph
94c2ca3591
use correct s thingy in english for words & reading time ( #503 )
...
Co-authored-by: L4Ph <me@l4ph.moe >
2025-06-18 23:32:29 +09:00
Katsuyuki Karasawa
9130765d45
Biome 2.0 with format ( #510 )
...
* execute migrate command
* migrate to v2
* update config
* supress linter error
2025-06-18 23:01:28 +09:00
Katsuyuki Karasawa
9de7aa10e4
fix: refactor onMount to avoid unnecessary async calls for search ( #481 )
...
* fix: refactor onMount to avoid unnecessary async calls for search
* Production debugging to check the console
* feat: enhance Pagefind integration with improved loading checks and error handling
* fix: improve Pagefind integration with event handling for loading and errors
2025-06-06 21:11:03 +09:00
Saica and Hasenpfote
ee48c2f09d
feat: introduce Expressive Code for code block rendering ( #476 )
...
* feat: improve code block feature with Expressive Code
* docs: add example Markdown file for visual review
* feat: improve styles of Expressive Code
* fix: errors from the merging
* chore: formatting
* chore: update config
* chore: update dependencies
* fix: fix build error
* fix: minor fixes
* fix: style tweaks
* docs: update example post
* fix: isolate copy button timeouts to avoid cross-button interference
---------
Co-authored-by: Hasenpfote <Hasenpfote36@gmail.com >
2025-06-03 22:41:36 +08:00
saicaca
559a324ae5
fix: fix type errors
2025-05-30 20:34:35 +08:00
saicaca
dde7835dd7
fix: unable to list uncategorized posts on the archive page ( fix #471 )
2025-05-30 19:42:45 +08:00
saica.go
2d89e4d53f
feat: make archive page dynamic ( #469 )
2025-05-30 00:21:07 +08:00
Katsuyuki Karasawa
2b3d7cf304
fix: Trim whitespace from category and tag names in URL generation ( #437 )
2025-05-05 09:57:34 +09:00
Katsuyuki Karasawa
7f0c109b17
fix: Correct template literals for aria-label/class/style attributes ( #435 )
...
* fix: Correct template literals for aria-label attributes in PostMeta and Pagination components
* fix: Update template literals to use correct syntax in multiple components
2025-05-02 06:49:07 +09:00
Katsuyuki Karasawa
11535a9709
Fix category with reserved character ( #431 )
...
* fix: Encode category in URLs to handle reserved characters
* fix: Encode category names in static paths to handle reserved characters
2025-05-01 02:24:53 +09:00
Katsuyuki Karasawa
3194dfc521
fix: Encode URI components for tag links to handle reserved characters ( #430 )
...
* fix: Encode URI components for tag links to handle reserved characters
* delete: Remove reserved character test markdown file
2025-05-01 02:02:52 +09:00
jump-and-jump and L4Ph
fc0d3fc0e2
fix: Remove useless calls during initialization ( #295 )
...
* fix: Remove useless calls during initialization
* fix: refactor search component and enhance search functionality
* fix: clean up code formatting and improve readability in Search component and global types
---------
Co-authored-by: jump-and-jump <984292420@qq.com >
Co-authored-by: L4Ph <4ranci0ne@gmail.com >
2025-04-28 20:39:53 +09:00
jump-and-jump
0b5d290d30
style: The search panel exceeds the entire page ( #302 )
2025-04-28 19:49:15 +09:00
foxton9
772f0a9a5e
fix: TOC warning on home page ( #402 )
...
- conditionally render TOC for posts route;
- change warn to debug.
2025-04-28 19:48:36 +09:00