管理帮助:新闻
管理帮助:首页新闻更新指南
本页面仅用于指导管理员更新首页新闻内容,请严格按照步骤操作,绝对不要修改新闻区以外的任何代码。
一、进入编辑模式
1. 打开Wiki首页 2. 点击页面右上角的 「编辑」 按钮 3. 必须选择「编辑源代码」(不要使用可视化编辑,会破坏页面结构)
二、找到新闻区位置
在代码中找到以下段落(新闻区有明确的注释标记):
<!-- 适配chanmoe主题的新闻框 --> <div style="margin-top:20px; border-radius:16px; box-shadow:0 2px 8px rgba(0,0,0,0.05); overflow:hidden; background:#fff;"> <!-- 顶部标题栏 --> <div style="background:#e6f4e6; padding:10px 18px; font-weight:bold; color:#004499; border-bottom:1px dashed #88cccc;">新闻</div> <!-- 新闻内容区 - 所有新闻都在这里 --> <div style="padding:18px 22px; line-height:1.6;"> <!-- 👇 新新闻永远粘贴到这里(最上面)👇 --> <div style="margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid #e6f4e6;"> <div style="font-size:1.15em; font-weight:bold; color:#662222; margin-bottom:8px;">2026年4月29日</div> <div>网站开发中</div> </div> <!-- 👆 新新闻永远粘贴到这里(最上面)👆 --> </div> <!-- 底部归档链接 --> <div style="text-align:right; padding:8px 18px; background:#e6f4e6; border-top:1px dashed #88cccc; font-size:0.9em;"> [[新闻归档|旧新闻归档]] </div> </div>
三、添加新新闻(唯一正确操作)
1. 完整复制下面的新闻模板:
<div style="margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid #e6f4e6;"> <div style="font-size:1.15em; font-weight:bold; color:#662222; margin-bottom:8px;">YYYY年MM月DD日</div> <div>这里写新闻内容</div> </div>
2. 粘贴到新闻内容区的最顶部(最新的新闻永远显示在最上面)
3. 修改日期和新闻内容:
- 把 YYYY年MM月DD日 改成当天日期,例如 2026年5月1日
- 把 这里写新闻内容 改成实际内容,支持Wiki链接格式: 显示文字
✅ 正确示例
<div style="padding:18px 22px; line-height:1.6;"> <!-- 新添加的新闻放在最上面 --> <div style="margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid #e6f4e6;"> <div style="font-size:1.15em; font-weight:bold; color:#662222; margin-bottom:8px;">2026年4月30日</div> <div>新增 [[人物:Xiaofeima|争议开发者Xiaofeima]] 条目</div> </div> <!-- 原来的新闻往下排 --> <div style="margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid #e6f4e6;"> <div style="font-size:1.15em; font-weight:bold; color:#662222; margin-bottom:8px;">2026年4月29日</div> <div>网站开发中</div> </div> </div>
四、删除旧新闻(可选)
当新闻数量超过5条时,删除最下面的一条旧新闻:
1. 找到新闻内容区最底部的新闻块
2. 完整删除对应的整个
段落
3. 注意:最后一条新闻不需要删除底部分隔线
五、保存并预览
1. 编辑完成后,点击页面底部的 「显示预览」 按钮 2. 检查新闻是否正确显示,日期和内容是否无误 3. 确认无误后,点击 「保存更改」 按钮
⚠️ 重要注意事项
1. 绝对不要修改新闻区以外的任何代码 2. 绝对不要修改新闻模板里的任何 style 属性 3. 新闻内容只使用纯文本和 显示文字 格式 4. 不要添加任何HTML标签、图片或其他特殊格式 5. 最新的新闻永远放在最上面,旧新闻依次往下排
❌ 紧急恢复
如果不小心改坏了页面:
1. 不要保存,直接关闭浏览器标签页 2. 如果已经保存,点击页面右上角的 「查看历史」 3. 选择最近一个正常的版本,点击 「恢复此版本」