15
Static website generator Lunch and learn in 30 minutes Sylvain Witmeyer

Static website generator

Embed Size (px)

Citation preview

Page 1: Static website generator

Static website generatorLunch and learn in 30 minutes

Sylvain Witmeyer

Page 2: Static website generator

A static website like in the good old 90’s

Page 3: Static website generator

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

Page 4: Static website generator

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

Page 5: Static website generator

Static vs Dynamic

Page 6: Static website generator

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

Page 7: Static website generator

Which one to choose ?

Page 8: Static website generator

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 ?

Page 9: Static website generator

Static website generators

Page 10: Static website generator

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)

Page 11: Static website generator

https://serverless.com/blog/ https://github.com/serverless/blog/tree/master/posts

Example

Page 12: Static website generator

Labs with hugoPublish your templates in 4 minutes

Page 13: Static website generator

Prerequisite- Install Hugo

- Create a github repository

- Pick up a theme at http://themes.gohugo.io/

Page 14: Static website generator

Create and deploy your static website in 4 min

https://asciinema.org/a/107230

Page 15: Static website generator

Questions ?