Some TILs about programming, photography and other stuff.

Jekyll

Empezar un proxecto

gem install bundler jekyll
jekyll new my-awesome-site
cd my-awesome-site

Arrancamos o servidor:

bundle exec jekyll serve

Acceder a http://localhost:4000

Estrutura do proxecto

Esta sería a miña estrutura inicial:

.
├── 404.html
├── about.markdown
├── _config.yml
├── Gemfile
├── Gemfile.lock
├── index.markdown
├── _posts
│   └── 2021-04-02-welcome-to-jekyll.markdown
├── _site
│   ├── 404.html
│   ├── about
│   │   └── index.html
│   ├── assets
│   │   ├── main.css
│   │   ├── main.css.map
│   │   └── minima-social-icons.svg
│   ├── feed.xml
│   ├── index.html
│   └── jekyll
│       └── update
│           └── 2021
│               └── 04
└── vendor

Esta estrutura sería a que ven de exemplo na documentación:

.
├── _config.yml
├── _data
│   └── members.yml
├── _drafts
│   ├── begin-with-the-crazy-ideas.md
│   └── on-simplicity-in-technology.md
├── _includes
│   ├── footer.html
│   └── header.html
├── _layouts
│   ├── default.html
│   └── post.html
├── _posts
│   ├── 2007-10-29-why-every-programmer-should-play-nethack.md
│   └── 2009-04-26-barcamp-boston-4-roundup.md
├── _sass
│   ├── _base.scss
│   └── _layout.scss
├── _site
├── .jekyll-metadata
└── index.html # can also be an 'index.md' with valid front matter

Máis información sobre a estrutura:

Directory Structure

Liquid

Jekyll usa a linguaxe de plantillas Liquid:

Liquid template language

Isto pode ser útil para os snippets de código:

Tags Filters

E para poñer links:

Tags Filters

Variables

Variables globais

Variables

Importante revisar para despregar en PRO:

How to detemine if jekyll running locally or in production site?

Desplegar en PRO:

Jekyll/Untitled.png

Primeros pasos en Jekyll. Blog en 20 minutos.