How are the folders and files organized in jekyll?

4 minute read

Intro

Previous post writes about how to setup a github page personal website with jekyll. This post will tell about the folders and files. Here we just focus on the files and folders that directly related to the content, we won’t touch the low level code.

Structure

  • _config.yml The configuration of the whole project. You can just look at “# Site Settings” section and “# Site Author” section and ignore everything else.

  • Gemfile The Ruby gem file that tells what packages and versions are being used in the project

  • _pages/ The folder that contains each page (like Publications, Talks, etc)
    • _pages/about.md The default entrance page https://noctildon.github.io
    • _pages/publications.md The publications page https://noctildon.github.io/publications
    • _pages/research.md The research page https://noctildon.github.io/research
    • _pages/teaching.md The teaching page https://noctildon.github.io/teaching
    • _pages/cv.md The CV page https://noctildon.github.io/cv
    • _pages/posts.html The posts page https://noctildon.github.io/posts
    • _pages/talks.html The talks page https://noctildon.github.io/talks
  • _posts/ The folder that contains each separate talks
    • posts/2023-07-27-web.md A post about web on 07/27/2023
    • posts/2023-07-28-jekyll.md Another post about jekyll on 07/28/2023
    • and so on…
  • _publications/ The folder that contains each publication
    • _publications/2022-inelastic.md A paper regarding inelastic published in 2022
    • and so on…
  • _research/ The folder that contains research notes or writeup (less formal than publications, doesn’t have to be published)
    • _research/higgs.md A research writeup about Higgs boson
    • and so on…
  • _talks/ The folder that collects the talks
    • _talks/slides/ The folder of PDF slides for the talks
    • _talks/2018-alma.md A talk about ALMA in 2018
    • _talks/2021-pheno.md A talk given in 2021 Pheno conference
  • files/ The folder that include static files, such as PDF
  • images/ The folder that contains the image used in the project
  • resume/ The folder of the $\LaTeX$ format resume/CV

Posts

The files should be under _posts/. The filename follows YYYY-MM-DD-XXXX.md format, XXXX is usually the short title. An example is below

---
title: My very first little post
date: 1990-01-01
permalink: /posts/1990/1st-little/
excerpt: "My 1st post"
tags:
  - html
  - github
---
This is my first post
  • “title”: The title of the post
  • “date”: The date when the post is posted. The posts will be sorted by date
  • “permalink”: The url link of the post at this website, which can then be access by other posts or file
  • “excerpt”: A short description before clicking the post link
  • “tag”: The tags of the post

Talks

The files should be under _talks/. The filename follows YYYY-XXXX.md format, XXXX is usually the short title. An example is below

---
title: "My talk title"
collection: talks
type: "Talk"
permalink: /talks/1990-earth
venue: "ABC University"
date: 1990-01-01
location: "Earth"
---
This is a talk I gave at ABC university

Most of the attributes are fixed. We just need to modify the following

  • “title”: the title of the talk
  • “permalink”: the url link of the talk
  • “venu”: the place or institute where the talk was given
  • “date”: the date of the talk
  • “location”: the location of the talk

Research

The files should be under _research/. The filename follows XXXX.md format, XXXX is usually the short title. Unlike Posts or Talks, we don’t have to include date in the filename. An example is below

---
title: "Higgs Boson Discovery"
layout: single-portfolio
excerpt: "<img src='/images/research/standard-model.png' alt=''>"
collection: research
order_number: 40
header:
  og_image: "research/standard-model.png"
---
On 4 July 2012, the discovery of a new particle with a mass between 125 and 127 GeV/c2 was announced.

Most of the attributes are already introduced. The unseen one is

  • “order_number”: the sorting order of the research writeup

Publications

The file is under _publicatiosn/, named after YYYY-XXXX.md, XXXX is the short title. Below is one of my publications

---
title: "Inelastic nuclear scattering from neutrinos and dark matter"
collection: publications
permalink: /publication/2022-inelastic
date: 2022-12-21
link: 'https://journals.aps.org/prd/abstract/10.1103/PhysRevD.106.113006'
arxiv: 'https://arxiv.org/abs/2206.08590'
github: 'https://github.com/noctildon/Inelastic'
inspirehep: 'https://inspirehep.net/literature/2097598'
citation: 'Bhaskar Dutta, <strong>Wei-Chih Huang</strong>, Jayden L. Newstead, and Vishvas Pandey. <i>Phys. Rev. D 106, 113006</i>'
abstract: 'Neutrinos with energy of order 10 MeV, such as from pion decay-at-rest sources, are an invaluable tool
for studying low-energy neutrino interactions with nuclei—previously enabling the first measurement of
coherent elastic neutrino-nucleus scattering. Beyond elastic scattering, neutrinos and dark matter in this
energy range also excite nuclei to its low-lying nuclear states, providing an additional physics channel.
Here, we consider neutral-current inelastic neutrino-nucleus and dark matter (DM)-nucleus scattering off
$^{40}$Ar, $^{133}$Cs, and $^{127}$I nuclei...'
---

The attributes are now pretty self-explanatory. Two things to notice

  • We can use html tags such as <strong> (bold) and <i> (italic)
  • We can use latex equation wrapped by dollar sign $

FAQ

Q: How to remove the page I don’t want?

A: Remove the item in _data/navigation.yml

Q: I don’t like the color theme style, how can I change it?

A: For the global theme, refer to Minimal Mistakes docs. For the samll changes, you can try to trace the element by Inspect tool in browser and find the source code in _sass/

Further reading