myst729 / Vuelog

A backend-free blog system built on top of Vue.js
https://vuelog.js.org/
MIT License
266 stars 39 forks source link

Pages and menus autogenerate entries? #14

Closed artelse closed 7 years ago

artelse commented 7 years ago

Have been looking at a few node cms/blog options. What I am wondering about with Vuelog is why we need to manually add pages and menu items in a database file. Other systems just generate these from markdown metadata. Look say at Gatsby. For the rest it looks like a compelling system.

myst729 commented 7 years ago

The build process in Jekyll or Hexo is like, set up a node service, read MD files from the directory, parse MD files and generate site topology, dump to HTML files.

Vuelog is designed to not have the build process (please read https://myst729.github.io/Vuelog/#/page/about for my reasons), so there's no way to access the directory where MD files are stored. That's why we need the database - to track paths of the MD files.

Without the build process, retrieving a post's metadata becomes more expensive - get the MD file path, request the MD file, and parse the MD file. Sometimes we only need the metadata (the archive view typically), to request bunch of MD files is a big waste, so I move metadata to the database too. Although this introduces extra redundancies, the number of (unnecessary) network requests are reduced.

artelse commented 7 years ago

Ok, thanks for the explanation. I am looking for a static builder with Vue and node, so continue my search.

myst729 commented 7 years ago

To me nuxt.js is a promising project. It's a framework based on Vue's server side rendering functionality, but it could also work like a static site generator. You could give it a try.