Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Jekyll the static site generator
Search
bruno2ms
August 20, 2015
Technology
0
43
Jekyll the static site generator
Jekyll the static site generator
bruno2ms
August 20, 2015
Tweet
Share
More Decks by bruno2ms
See All by bruno2ms
Will Js Kill CSS
bruno2ms
0
170
Google Design Sprints
bruno2ms
0
170
Building UX Team
bruno2ms
3
84
Jekyll the static site generator Liquid For Designers
bruno2ms
0
60
Bad Leaders - Manual de como falhar como líder
bruno2ms
0
36
Lean UX
bruno2ms
3
240
Other Decks in Technology
See All in Technology
うちの会社の評判は?SNSの投稿分析にAIを使ってみた
doumae
0
270
Data Hubグループ 紹介資料
sansan33
PRO
0
1.7k
What's Next in OpenShift Q2 CY2025
redhatlivestreaming
1
830
ソフトウェアテストのAI活用_ver1.10
fumisuke
0
240
Babylon.jsでゲームを作ってみよう
limes2018
0
100
Java 30周年記念! Javaの30年をふりかえる
skrb
1
980
Azure Developer CLI と Azure Deployment Environment / Azure Developer CLI and Azure Deployment Environment
nnstt1
1
130
LT:組込み屋さんのオシロが壊れた!
windy_pon
0
470
Scale Security Programs with Scorecarding
ramimac
0
440
セキュリティSaaS企業が実践するCursor運用ルールと知見 / How a Security SaaS Company Runs Cursor: Rules & Insights
tetsuzawa
0
460
SmartHRの複数のチームにおけるMCPサーバーの活用事例と課題
yukisnow1823
2
1.2k
AIに実況させる / AI Streamer
motemen
3
1.4k
Featured
See All Featured
Code Review Best Practice
trishagee
68
18k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Rails Girls Zürich Keynote
gr2m
94
13k
Bash Introduction
62gerente
614
210k
Fireside Chat
paigeccino
37
3.5k
Gamification - CAS2011
davidbonilla
81
5.3k
Code Reviewing Like a Champion
maltzj
523
40k
Scaling GitHub
holman
459
140k
RailsConf 2023
tenderlove
30
1.1k
How GitHub (no longer) Works
holman
314
140k
Side Projects
sachag
454
42k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Transcript
Sta$c Site Generator @bruno2ms
Como começar?
Ruby + Liquid + YAML
Como funciona? • Converte Markdown, Tex$le e HTML com
Liquid Tags • Aplica templates e Layout Pages • Converte arquivos sass • Se aproveita da estrutura de pastas para gerar blog e posts • Transforma isso tudo em HTML está$co
O que já vem pronto? • Paginação • Estrutura
personalizada de permalinks • Posts relacionados • Syntax highlight • Conversão Markdown/Tex$le
Estrutura Inicial
Configuração Centralizada _config.yml
Configuração YAML • Configuração de variáveis globais • Variáveis
reu$lizáveis de acordo com estrutura dos arquivos • Adicione as chaves que desejar para reaproveitar em todo o site
Exemplo
YAML Front MaJer --- layout: post title: Blogging Like a
Hacker permalink: /path/to/my/page/ published: true categories: [categoria1, categoria2] --- <!DOCTYPE HTML> <html> <head> <title>{{ site.name }} - {{ page.title }}</title> </head> <body> ...
Deploy? • Instancia grá$s do Heroku • GitHub Pages
• Direto para a Amazon S3 • Qualquer lugar que aceite páginas está$cas • hTp:/ /jekyllrb.com/docs/deployment-‐ methods/
Comentários do Blog? Extender -‐ Disqus (exemplo) -‐
Intense Debate -‐ Facebook Comments
Disqus ... layout: default comments: true # other options ...
{% if page.comments %} {% include disqus.html %} {% endif %} <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = ‘your_user'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/ javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> sua_pagina.html _includes/disqus.html
Data Files? _data/*/*.yml _data/*/*.csv _data/*/*.json
Data Files - name: Tom Preston-Werner github: mojombo - name:
Parker Moore github: parkr - name: Liu Fengyun github: liufengyun <ul> {% for member in site.data.members %} <li> <a href="https://github.com/{{ member.github }}"> {{ member.name }} </a> </li> {% endfor %} </ul> index.yml _data/members.yml
Data Files name: Bluesoft members: - name: Tom Preston-Werner github:
mojombo - name: Parker Moore github: parkr _data/orgs/blueso\.yml _data/orgs/webgoal.yml name: Webgoal members: - name: Tom Preston-Werner github: mojombo - name: Parker Moore github: parkr <ul> {% for org_hash in site.data.orgs %} {% assign org = org_hash[1] %} <li> <a href="https://github.com/{{ org.username }}"> {{ org.name }} </a> ({{ org.members | size }} members) </li> {% endfor %} </ul>
Arquitetura de Plugins (facilidade de extender) _plugins/*.rb hTp:/ /jekyllrb.com/docs/plugins/
OBRIGADO (confira as próximas apresentações avançadas) @bruno2ms