[英]How to edit CSS and HTML in frameworks such as Hexo using Node.js
I am new to Node.js
and decided to try to make a blog website using Hexo . 我是Node.js
新手,并决定尝试使用Hexo创建一个博客网站。 The problem I am having is trying to edit the main style sheet and index files to include a new web font (or any editing in general). 我遇到的问题是尝试编辑主样式表和索引文件以包含新的Web字体(或一般的任何编辑)。
The way I figured it would work is I would make the change and the server would pick it, such as with the /themes folder
as stated in the docs. 我认为它的工作方式是我会进行更改,服务器会选择它,例如文档中所述的/themes folder
。 Though this is not the case and it doesn't seem like you can edit the CSS directly. 虽然情况并非如此,但您似乎无法直接编辑CSS。
How do I edit the main CSS and index in such frameworks as these? 如何编辑这些框架中的主要CSS和索引?
In Hexo, the theme is responsible for rendering and styling the content in HTML. 在Hexo中,主题负责在HTML中呈现和样式化内容。 The theme can decide what preprocessor (for CSS and HTML templating) to use. 主题可以决定使用什么预处理器(用于CSS和HTML模板)。
landscape
is using Stylus for CSS and EJS (note it is 1.0) for templating. landscape
正在使用Stylus for CSS和EJS (注意它是1.0)进行模板化。
You have to npm install hexo-renderer-ejs hexo-renderer-stylus
for it to work. 你必须npm install hexo-renderer-ejs hexo-renderer-stylus
才能工作。
There are other renderers but they are less popular. 还有其他渲染器,但它们不太受欢迎。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.