Milo
Milo

Reputation: 3453

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. 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).

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. Though this is not the case and it doesn't seem like you can edit the CSS directly.

How do I edit the main CSS and index in such frameworks as these?

Upvotes: 3

Views: 2067

Answers (2)

leesei
leesei

Reputation: 6070

In Hexo, the theme is responsible for rendering and styling the content in HTML. The theme can decide what preprocessor (for CSS and HTML templating) to use.

landscape is using Stylus for CSS and EJS (note it is 1.0) for templating.
You have to npm install hexo-renderer-ejs hexo-renderer-stylus for it to work.

There are other renderers but they are less popular.

Upvotes: 1

Cristyan
Cristyan

Reputation: 670

Hexo.io used Stylus, you can look at the documentation.

I tried to make changes to the default theme and worked.

by examples in the path: themes \ landscape \ source \ css - style.styl

Upvotes: 3

Related Questions