fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.49k stars 274 forks source link

请问如何修改内容区域的宽度 #380

Closed phioenx closed 10 months ago

phioenx commented 10 months ago

「描述遇到的问题」或「发现的 bug」(Describe the problem or bug you encounter)

你是否已经阅读过以下内容,并确认你的行为是正确的,在 [ ] 中填入 x 选中(Ensure that you had consulted followings and confirm the validity of your operation, fill x in [ ] to select)

如何复现(To Reproduce)

存在问题或 bug 的已部署上线的页面地址(A deployed page link that with bug or problem)

如果可能是与 markdown 内容相关的问题或 bug,请粘贴对应的 markdown 内容(If the problem or bug that may be related to markdown, paste it here)

打开控制台,填写控制台中打印的主题的版本,如果脚本出错可直接提供控制台截图(Open the console and report the version of hexo-theme-archer. You can paste the screenshot on console directly if there is error with script)

信息 (please complete the following information):

其他信息(Additional context)

LolipopJ commented 10 months ago

image

通过修改样式文件 src/scss/_partial/_post-page.scss.main 样式,新增 width 字段设为您想要的宽度,再编译成新的样式文件即可。

同理,如需修改首页文章的宽度,应修改 src/scss/_partial/_index-page.scss 文件,添加 .index-page.main 样式,修改 width 字段。

phioenx commented 10 months ago

请问,增加字段后是直接保存就好了吗?如果不是,是要编译的话,该如何编译

LolipopJ commented 10 months ago

请问,增加字段后是直接保存就好了吗?如果不是,是要编译的话,该如何编译

需要重新编译,主题的 CSS 样式文件基于 SCSS 编译得到,仅修改 SCSS 源文件不会有效果。

可参考主题开发者文档,配置本地环境,编译得到目标样式文件。

phioenx commented 10 months ago

问题已解决,感谢