SlideShare uma empresa Scribd logo
1 de 10
Getting Started with Jekyll
Or: How to blog like a hacker
A few basics
•

Jekyll is static site generator written in ruby.

•

This means jekyll takes text files, written in markdown
or textile, and combines them with user generated
templates to form html pages.

•

Jekyll is oriented towards blogs, but can be used to
host any kind of static site.

•

You care because you want a place online to show off
your projects and the things you know, and you want
to do it with tools you already use.
Tools we’re using:
•

RVM (or rbenv) to manage ruby versions. You don’t
have to it’s just a bit easier

•

Ruby 2.0

•

Ruby Gems

•

Git

•

A Github account

•

A text Editor
Installing Ruby
1. Open up a terminal window and type the following:
curl -L https://get.rvm.io | bash -s stable —ruby

2. RVM should modify your dot files (.bashrc .zshrc etc
unless you tell it not to). So you need to source them
again.
3. Ruby 2.0 should have been installed, but if not you
can rvm install 2.0.0 & rvm use 2.0.0
4. You can learn more about RVM installation from
www.rvm.io
Installing Jekyll
•

Now that we have ruby installed, it’s time to install jekyll

•

gem install jekyll

•

This should install all the necessary gems to run your jekyll
site

•

Move to the directory where you are going to store your
site

•

jekyll new <site-name>

•

That’s it!
Getting set up on Github
•

Github supports jekyll out of the box to generate static web pages

•

Our local IU Github will work, but it will be cooler to use github.com

•

Create a new repository on github.com named <github-username>.github.io

•

Change directories to your new jekyll site folder (in your terminal) and run
the following

•

git init

•

git remote add origin git@github.com:<github-username>/<githubusername>.github.io.git

•

Now any commit that you push to the origin remote will trigger a
regeneration of your jekyll site, which will be available at <githubusername>.github.io
The Directory Structure
•

_config.yml is where all of your configuration data goes

•

_drafts is for drafts

•

_posts is for more finished posts, these have a different naming
scheme

•

_layouts holds the layout files that you specify for pages or posts

•

_includes holds partials which can be used with liquid {% include %}
tags

•

_site holds the generated site

•

index.html or index.md is the homepage of your site
Post files
•

Posts are either written in markdown or textile

•

Each posts starts with a block of YAML front matter which
specifies the title, layout and some other configuration data.
It all goes between two sets of “—“

•

Everything in the body of the post gets placed in the
{{ content }} tag in your layout file.

•

Post files should be named like this YEAR-MONTH-DAYtitle.MARKUP. For instance: 2013-11-08-jekyllintroduction.md is a post that is published on November 8th
titled “Jekyll Introduction”
Using the jekyll gem
•

In order to build your site locally, you run jekyll build, which
will place your generated site into the _site folder.

•

Jekyll will copy any file or folder that doesn’t start with an
underscore into the _site folder.

•

Any file with YAML frontmatter will be parsed by jekyll and
converted to HTML.

•

Files and folders with an underscore are not copied.

•

Jekyll comes with a built in server to test your site before
you publish it. jekyll serve starts a server on port 4000.
Wrap Up
•

Jekyll has many more options than what we just covered.

•

The jekyll homepage: www.jekyllrb.com has all of the
documentation on how to use all of jekyll’s features.

•

This page http://jekyllrb.com/docs/sites/ has good examples of
jekyll sites that you can check out to help you start your own

•

Check the resources page (http://jekyllrb.com/docs/resources/)
for a few helpful blog posts from other jekyll users

•

The liquid wiki (http://docs.shopify.com/themes/liquid-basics) will
give you everything you need to set up your templates in _layouts

Mais conteúdo relacionado

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Jekyll starter

  • 1. Getting Started with Jekyll Or: How to blog like a hacker
  • 2. A few basics • Jekyll is static site generator written in ruby. • This means jekyll takes text files, written in markdown or textile, and combines them with user generated templates to form html pages. • Jekyll is oriented towards blogs, but can be used to host any kind of static site. • You care because you want a place online to show off your projects and the things you know, and you want to do it with tools you already use.
  • 3. Tools we’re using: • RVM (or rbenv) to manage ruby versions. You don’t have to it’s just a bit easier • Ruby 2.0 • Ruby Gems • Git • A Github account • A text Editor
  • 4. Installing Ruby 1. Open up a terminal window and type the following: curl -L https://get.rvm.io | bash -s stable —ruby 2. RVM should modify your dot files (.bashrc .zshrc etc unless you tell it not to). So you need to source them again. 3. Ruby 2.0 should have been installed, but if not you can rvm install 2.0.0 & rvm use 2.0.0 4. You can learn more about RVM installation from www.rvm.io
  • 5. Installing Jekyll • Now that we have ruby installed, it’s time to install jekyll • gem install jekyll • This should install all the necessary gems to run your jekyll site • Move to the directory where you are going to store your site • jekyll new <site-name> • That’s it!
  • 6. Getting set up on Github • Github supports jekyll out of the box to generate static web pages • Our local IU Github will work, but it will be cooler to use github.com • Create a new repository on github.com named <github-username>.github.io • Change directories to your new jekyll site folder (in your terminal) and run the following • git init • git remote add origin git@github.com:<github-username>/<githubusername>.github.io.git • Now any commit that you push to the origin remote will trigger a regeneration of your jekyll site, which will be available at <githubusername>.github.io
  • 7. The Directory Structure • _config.yml is where all of your configuration data goes • _drafts is for drafts • _posts is for more finished posts, these have a different naming scheme • _layouts holds the layout files that you specify for pages or posts • _includes holds partials which can be used with liquid {% include %} tags • _site holds the generated site • index.html or index.md is the homepage of your site
  • 8. Post files • Posts are either written in markdown or textile • Each posts starts with a block of YAML front matter which specifies the title, layout and some other configuration data. It all goes between two sets of “—“ • Everything in the body of the post gets placed in the {{ content }} tag in your layout file. • Post files should be named like this YEAR-MONTH-DAYtitle.MARKUP. For instance: 2013-11-08-jekyllintroduction.md is a post that is published on November 8th titled “Jekyll Introduction”
  • 9. Using the jekyll gem • In order to build your site locally, you run jekyll build, which will place your generated site into the _site folder. • Jekyll will copy any file or folder that doesn’t start with an underscore into the _site folder. • Any file with YAML frontmatter will be parsed by jekyll and converted to HTML. • Files and folders with an underscore are not copied. • Jekyll comes with a built in server to test your site before you publish it. jekyll serve starts a server on port 4000.
  • 10. Wrap Up • Jekyll has many more options than what we just covered. • The jekyll homepage: www.jekyllrb.com has all of the documentation on how to use all of jekyll’s features. • This page http://jekyllrb.com/docs/sites/ has good examples of jekyll sites that you can check out to help you start your own • Check the resources page (http://jekyllrb.com/docs/resources/) for a few helpful blog posts from other jekyll users • The liquid wiki (http://docs.shopify.com/themes/liquid-basics) will give you everything you need to set up your templates in _layouts