To clone the bsl-group.github.io repository to your local machine, follow these steps:
- Open a terminal on your machine.
- Navigate to the directory where you want to clone the repository.
cd path/to/your/directory
- Run the following command to clone the repository:
git clone https://github.com/bsl-group/bsl-group.github.io.git
- Navigate to the cloned directory:
cd bsl-group.github.io
- Jekyll uses Markdown files for creating posts. The posts are stored in the
_posts
directory and should follow a specific naming convention:YYYY-MM-DD-post-title.md
. - The directory is organized into subdirectories such as home and research-papers, with each post being a Markdown file that contains front matter defining the title, date, tags, classes, sidebar navigation, category, excerpt, and a header image (teaser).
-
Navigate to the
_posts
directory:cd _posts
-
Create a new Markdown file for your post:
touch YYYY-MM-DD-your-post-title.md
-
Edit the file using your preferred text editor:
nano YYYY-MM-DD-your-post-title.md
-
Add Front Matter: Each post requires a front matter block that defines metadata such as title, date, and layout. Example:
--- title: "Superplumes from the Core-Mantle Boundary to the Lithosphere: Implications for Heat Flux" date: 2014-06-17 tags: [] toc: true sidebar: nav: "all_posts_list" category: research-papers excerpt: "Superplumes from the Core-Mantle Boundary to the Lithosphere: Implications for Heat Flux" header: teaser: "/images/superplumes-from-the-core-mantle-boundary-to-the-lithosphere/QVplume.gif" ---
title
: The title of your post.date
: The date of publication in YYYY-MM-DD format.tags
: A list of tags for categorizing the post (optional).toc
: Table of contentssidebar
: Specifies the sidebar navigation (e.g., nav: "all_posts_list").category
: The category the post belongs to (e.g., research-papers).excerpt
: A brief description or summary of the post.header
: Contains the teaser image path to be displayed at the top of the post.
-
Write your content using Markdown syntax. Here’s an example:
# Heading This is your content. You can write **bold text**, *italic text*, and more. ## Subheading Add images, links, and lists in Markdown.
-
Adding a Figure to a Post: To include a figure in your post, you can use HTML within your Markdown file. This is useful for customizing the size, alignment, and caption of the image.
<figure style="width: 350px; margin: 0 auto; text-align: center;"> <img style="width: 100%" src="/images/theoretical_wave_propagation/Nact.gif"> <figcaption><strong>Non-linear Asymptotic Coupling Theory</strong></figcaption> </figure>
-
Save and exit the file.
In this Jekyll setup, pages are stored in the _pages directory, including specific subdirectories for different types of pages (e.g., members' profiles). Each page includes front matter that defines the permalink, classes, and other metadata like the author's name and GitHub profile.
$ tree _pages/
_pages/
├── 404.md
├── members
│ ├── barbararomanowicz.md
│ ├── chaolyu.md
│ ├── jonathanwolf.md
│ ├── nicolasvalencia.md
│ └── utpalkumar.md
├── members.md
└── posts.md
- Each file in this directory represents a page or a category of pages. For example, member profile pages are stored under the _pages/members/ subdirectory.
- Navigate to the _pages directory:
cd _pages
- Create a new Markdown file for your page:
touch new-page.md
- Edit the file using your preferred text editor:
nano new-page.md
- Add Front Matter: Each page requires front matter to define metadata such as permalink, classes, GitHub link, and the author's name. For example:
--- permalink: "/new-page/" classes: - wide github: "https://github.com/example" author: "Author Name" ---
- Write your content in Markdown:
# New Page Title This is the content of your new page. Use **Markdown** syntax to format your text, include images, or add links.
- Save and exit the file.
In this setup, authors are managed via the _data/authors.yml
file, where each author’s information such as name, bio, avatar, and contact links is stored. This allows for a consistent display of author information across posts and pages.
-
Open the authors.yml file:
nano _data/authors.yml
-
Add a new author to the file by following the structure outlined below. Each author entry should contain their name, bio, avatar (image URL), and links (e.g., email). Here’s an example format:
# /_data/authors.yml johnsmith: name: "John Smith" bio: "Research Scientist at Example Institute, specializing in geophysics and computational seismology." avatar: "https://example.com/images/johnsmith.jpg" links: - label: "Email" icon: "fas fa-fw fa-envelope-square" url: "mailto:john.smith@example.com" - label: "GitHub" icon: "fab fa-fw fa-github" url: "https://github.com/johnsmith"
-
Save and exit the file after making the necessary additions.
The index.html
file controls the content and layout of your website's homepage. The front matter at the top of the file defines the layout, author profile, classes, sidebar content, and GitHub link.
---
layout: home
author_profile: false
classes:
- landing
- wide
sidebar:
- image: "assets/images/barbara_romanowicz.jpg"
text: "Prof. Barbara Romanowicz"
subtext: "Professor of the Graduate School, Department of Earth and Planetary Science, UC Berkeley"
- image: "images/semucb_wm1.png"
nav: "all_posts_list"
smalltext: "Whole-mantle depth cross-sections of relative shear-velocity variations in model SEMUCB-WM14, in the vicinity of major hotspots. [French et al., 2015]"
github: "https://github.com/bsl-group"
---
layout
: Specifies the layout used for the homepage.author_profile
: Set to false to hide the author’s profile (Barbara's profile defined in_config.yaml
) on the homepage.classes
: Define additional CSS classes for customizing the homepage layout, such as landing or wide.sidebar
: Configures the sidebar content, including images, text, and links to post lists or external sources.github
: Adds a GitHub link to the homepage.
- Open index.html in your preferred text editor:
nano index.html
- Modify the front matter fields as necessary to update the layout, sidebar content, or add new elements like text or images.
- Save and exit after making your changes
The _config.yml
file in Jekyll is a configuration file that defines global settings for your site, such as the title, description, author information, theme options, and plugins. It allows you to customize various aspects of your site's behavior and appearance.