Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beginner questions - incremental regeneration & html from data #2920

Closed
kosirm opened this issue Dec 18, 2017 · 2 comments
Closed

Beginner questions - incremental regeneration & html from data #2920

kosirm opened this issue Dec 18, 2017 · 2 comments

Comments

@kosirm
Copy link

kosirm commented Dec 18, 2017

Hi, I'm looking for static site generator and hexo looks like a good choice since it is node based.
First of all I would like to congratulate all contributors for their work, thanks for sharing this amazing
free software with us!
I would like to know some details, which I can't find in documentation.

My two questions:
1.) is it possible to incrementaly generate hexo site, so I don't have to regenerate whole site, if only one file was changed?
Suppose I have thousands of pages... you know what I mean :)

2.) I would like to know if it is possible in Hexo to create pages from data file, something like this in jekyll...
For example if I have a list of products and I would like to create one page for every product from list (based on template)...

Example:
Suppose I have data file with data for users (name, address, bio, etc).
I would like to generate:

  • html page with all users (based on one template)
  • html page for every user (based on second template)

At the same time user pages should be linked from page with all users, so if you click on user on page with all users, browser should load detail page with that user. Hope this makes sense.

Since I'm new to hexo, I would be grateful if you could point me in the right direction (maybe some plugin already exist, etc).
Thanks in advance for any reply!

@NoahDragon
Copy link
Member

  1. yes, if you don't run hexo clean or delete db.json file, Hexo will only generate the file that just changed. However, currently, we have a bug on this feature db.json gets wiped when a new post is created, is this normal? #2900
  2. yes, it could. The https://hexo.io is generated based on data files. However, you may need to write scripts to support the link between generated pages.

@kosirm
Copy link
Author

kosirm commented Dec 19, 2017

Thanks for answer! Good luck with bug squashing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants