pablomartinezalvarez / glayu

A static site generator for mid-sized sites.
MIT License
79 stars 4 forks source link

Preview Server #4

Closed pmartinezalvarez closed 6 years ago

pmartinezalvarez commented 7 years ago

Add a new serve command:

$ glayu serve [-p] 
Option Description
[-p, --port] Overrides default port

That starts a local server, by default at port 4000 and enables the preview of the site pages.

Pages will be rendered dynamically instead of been generated on the public folder. This prevents conflicts in case you are working on a shared public directory.

Accessing previews:

Type Source Preview url
Draft ./source/_drafts/my-first-glayu-post.md http://localhost:4000/_drafts/my-first-glayu-post.md
Post ./source/_posts/software/static-sites/2017/07/11/my-first-glayu-article.md http://localhost:4000/software/static-sites/2017/07/11/my-first-glayu-article.html and http://localhost:4000/_posts/software/static-sites/2017/07/11/my-first-glayu-article.html
Page ./source/my-first-glayu-page.md http://localhost:4000/my-first-glayu-page.html