Upload
sylvain-witmeyer
View
56
Download
1
Embed Size (px)
Citation preview
Static website generatorLunch and learn in 30 minutes
Sylvain Witmeyer
A static website like in the good old 90’s
What is a static website
- Simply HTML pages
- Same content for all users
- Same content for all contexts
- Basic 1 URL = 1 content = 1 page
What is a dynamic website
- Page built for each impression
- Include some logic
- Automatic content
- Also contains static components (images, css, js)
- Content can vary for each request
- Need a server with a server-side language
Static vs Dynamic
AdvantagesStatic
Cheap to host
Fast
Quick & Easy to develop
Scalable
Secure
Run on browser
Version control of content
Dynamic
More functional
Easy to manage / CMS
Custom content
Content often store in Database
Uploaded only once
Real time update
Which one to choose ?
Think static first
Is static right for me ?
Do I have to update content often ?
Do I have need to use a database ?
Do I have some techies in my team ?
Static website generators
What is a static website generator
Tool that apply recursively a template on files
Use markdown syntax for writing content
Write content offline and publish later
Examples https://www.staticgen.com/
- Hugo (go)
- Jekyll (ruby)
- Hexo (nodeJS)
- Octopress (fork of Jekyll)
- Pelican (python)
https://serverless.com/blog/ https://github.com/serverless/blog/tree/master/posts
Example
Labs with hugoPublish your templates in 4 minutes
Prerequisite- Install Hugo
- Create a github repository
- Pick up a theme at http://themes.gohugo.io/
Create and deploy your static website in 4 min
https://asciinema.org/a/107230
Questions ?