Skip to content

Commit 2df0bb4

Browse files
committed
Merge branch 'bs4' of https://github.com/daattali/beautiful-jekyll into bs4
2 parents d4e677c + 9122e80 commit 2df0bb4

1 file changed

Lines changed: 43 additions & 22 deletions

File tree

README.md

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
### Table of contents
2222

2323
- [Features](#features)
24-
- [Build your website in 3 steps](#build-your-website-in-3-steps)
24+
- [**Build your website in 3 steps**](#build-your-website-in-3-steps)
2525
- [Add your own content](#add-your-own-content)
26-
- [Last important thing: parameters for each page](#last-important-thing-parameters-for-each-page)
27-
- [Supported YAML front matter parameters](#supported-yaml-front-matter-parameters)
26+
- [Customizing parameters for each page](#customizing-parameters-for-each-page)
27+
- [Supported parameters](#supported-parameters)
2828
- [Showcased users (success stories!)](#showcased-users-success-stories)
2929
- [FAQ and support](#faq-and-support)
3030
- [Credits and contributions](#credits)
@@ -34,12 +34,11 @@
3434
- **SIMPLE**: The primary goal of Beautiful Jekyll is to allow literally *anyone* to create a website in a few minutes.
3535
- **Mobile-first**: Designed to look great on both large-screen and small-screen (mobile) devices.
3636
- **Highly customizable**: Many personalization settings such as changing the background colour/image, adding a logo.
37-
- **Two-level navigation menu**: If you have many pages and your menu is getting cluttered, separate your menu into two levels.
38-
- **Flexible usage**: Install Beautiful Jekyll directly from GitHub or using a Ruby gem - choose the right [development method](#build-your-website-in-3-steps) for you.
37+
- **Flexible usage**: Use Beautiful Jekyll directly on GitHub or using a Ruby gem - choose the best [development method](#build-your-website-in-3-steps) for you.
3938
- **Battle-tested**: By using Beautiful Jekyll, you'll be joining tens of thousands of users who used this theme since 2015.
4039
- **Links to your social media**: You can easily add links to any of your social media accounts in the footer of every page.
41-
- **Comments support**: Add comments to any page using one of the supported commenting platforms: [Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), [Utterances](https://utteranc.es/), or [Staticman](https://staticman.net).
42-
- **Sharing blog posts on social media**: By default, all blog posts have buttons to allow people to share on Twitter/Facebook/LinkedIn.
40+
- **Comments support**: Add comments to any page using either [Disqus](https://disqus.com/), [Facebook comments](https://developers.facebook.com/docs/plugins/comments), [Utterances](https://utteranc.es/), or [Staticman](https://staticman.net).
41+
- **Share blog posts on social media**: By default, all blog posts have buttons to allow people to share on Twitter/Facebook/LinkedIn.
4342
- **Tags**: Any blog post can be tagged with keywords, and an index page showing all the tags is automatically generated.
4443
- **Tracking analytics**: Easily integrate Google Analytics, or other analytics platforms, to track visits to your website.
4544
- **Photos support**: Any page can have a cover photo around its title, and any blog post can have an associated image.
@@ -82,15 +81,19 @@ If you followed the easy method above, then you already have your site and you c
8281

8382
## Add your own content
8483

85-
To add pages to your site, you can either write a markdown file (`.md`) or you can write an HTML file directly. It's much easier to write markdown than HTML, so I suggest you do that (use [this great tutorial](https://markdowntutorial.com/) if you need to learn markdown in 5 minutes). You can look at some files on this site to get an idea of how to write markdown. To look at existing files, click on any file that ends in `.md`, for example [`aboutme.md`](./aboutme.md). On the next page you can see some nicely formatted text (there's a word in bold, a link, a few bullet points), and if you click on the pencil icon to edit the file, you'll see the markdown that generated the pretty text. Very easy!
84+
To add pages to your site, you can either write a markdown file (`.md`) or you can write an HTML file. It's much easier to write markdown than HTML, so I suggest you do that ([here's a great tutorial](https://markdowntutorial.com/) if you need to learn markdown in 5 minutes). You can look at some files on this demo site to get an idea of how to write markdown.
85+
86+
To look at existing files, click on any file that ends in `.md`, for example [`aboutme.md`](./aboutme.md). On the next page you can see some nicely formatted text (there's a word in bold, a link, a few bullet points), and if you click on the pencil icon to edit the file, you'll see the markdown code that generated the pretty text. Very easy!
8687

8788
In contrast, look at [`tags.html`](./tags.html). That's how your write HTML - not as pretty. So stick with markdown if you don't know HTML.
8889

90+
Any markdown or HTML file that you create will be available on your website under `https://<yourusername>.github.io/<pagename>`. For example, if you create a file `about.md` (or `about.html`) then it'll exist at `https://<yourusername>.github.io/about`.
91+
8992
Files you create inside the [`_posts`](./_posts) directory will be treated as blog entries. You can look at the existing files there to get an idea of how to write blog posts. Note the format of the blog post files - they must follow the naming convention of `YEAR-MONTH-DAY-title.md`. After you successfully add your own post, you can delete the existing files inside [`_posts`](./_posts) to remove the sample posts, as those are just demo posts to help you learn.
9093

91-
## Last important thing: parameters for each page
94+
## Customizing parameters for each page
9295

93-
In order to have your new pages use this template and not just be plain HTML pages, **you must add [YAML front matter](https://jekyllrb.com/docs/front-matter/) to the top of each page**. This is where you'll be able to give each page some extra parameters such as a title, a subtitle, or an image. [Below is a list of all available parameters](#supported-yaml-front-matter-parameters). If you don't want to use any parameters on a page (this also means having no title), then use the empty YAML front matter:
96+
**One last important thing**: In order to have your new pages use this template and not just be plain HTML pages, **you must add [YAML front matter](https://jekyllrb.com/docs/front-matter/) to the top of each page**. This is where you'll be able to give each page some extra parameters such as a title, a subtitle, or an image. [Below is a list of all available parameters](#supported-parameters). If you don't want to use any parameters on a page (this also means having no title), then use the empty YAML front matter:
9497

9598
```
9699
---
@@ -112,29 +115,47 @@ You can look at the top of [`aboutme.md`](https://raw.githubusercontent.com/daat
112115

113116
If you don't include YAML then your file will not use this template.
114117

115-
## Supported YAML front matter parameters
118+
## Supported parameters
119+
120+
These are the parameters that **Beautiful Jekyll** supports adding to the YAML front matter of any page. Remember to also look in the `_config.yml` file to see additional settings.
116121

117-
These are the main parameters you can place inside a page's YAML front matter that **Beautiful Jekyll** supports.
122+
### Main paramaters
123+
124+
These are the simple YAML parameters that you are most likely to use on most page.
118125

119126
Parameter | Description
120127
----------- | -----------
121128
title | Page or blog post title
122129
subtitle | Short description of page or blog post that goes under the title
123-
tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, self help, finance]`
130+
tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, analysis, finance]`
124131
cover-img | Include a large full-width image at the top of the page. You can either give the path to a single image, or provide a list of images to cycle through (see [my personal website](https://deanattali.com/) as an example).
125-
comments | If you want do add comments to a specific page, use `comments: true`. Comments are automatically enabled on blog posts; to turn comments off for a specific post, use `comments: false`. Comments only work if you enable at least one provider(Facebook, disqus, staticman) in `_config.yml` file.
126-
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`. If you want to turn it off by default, locate the line `show-avatar: true` in the file `_config.yml` and change the `true` to `false`; then you can selectively turn it on in specific pages using `show-avatar: true`.
127-
image | If you want to add a personalized image to your blog post that will show up next to the post's excerpt and on the post itself, use `image: /path/to/img`.
128-
readtime | If you want to show how many minutes it will take to read a post in the header, add `readtime: true`.
132+
comments | If you want do add comments to a specific page, use `comments: true`. Comments only work if you enable one of the comments providers (Facebook, disqus, staticman, utterances) in `_config.yml` file. Comments are automatically enabled on blog posts but not on other pages; to turn comments off for a specific post, use `comments: false`.
133+
134+
### Less commonly used parameters
135+
136+
These are parameters that you may not use often, but can come in handy for some people.
137+
138+
Parameter | Description
139+
----------- | -----------
140+
readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`.
141+
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`.
142+
image | If you want to add an image to your blog post that will show up next to the post's excerpt on the feed and in the post page itself, use `image: /path/to/img`.
129143
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here.
130-
social-share | If you don't want to show buttons to share a blog post on social media, use `social-share: false` (this feature is turned on by default).
131-
footer-extra | If you want to include extra information in the footer, create an HTML file in the `_includes/` folder (for example `_includes/myinfo.html`) and set `footer-extra` to the name of the file (for example `footer-extra: myinfo.html`)
144+
social-share | By default, every blog post has buttons to share the page on social media. If you want to turn this feature off, use `social-share: false`.
132145
nav-short | By default, the navigation bar gets shorter after scrolling down the page. If you want the navigation bar to always be short on a certain page, use `nav-short: true`
133-
use-site-title | If you want to use the site title rather than page title as HTML document title (ie. browser tab title), use `use-site-title: true`. When set, the document title will take the format `Site Title - Site Description` (eg. `My website - A virtual proof that name is awesome!`). By default, it will use `Page Title` if it exists, or `Site Title` otherwise.
134-
language | HTML language code to be set on &lt;html&gt; element (see [W3Schools website](https://www.w3schools.com/tags/ref_language_codes.asp) for more info on this topic). Language can also be set site-wide in `_config.yml`.
135-
layout | What type of page this is (default is `post` for blog posts and `page` for other pages). See _Page types_ section below for more information.
136146
gh-repo   | If you want to show GitHub buttons at the top of a post, this sets the GitHub repo name (eg. `daattali/beautiful-jekyll`). You must also use the `gh-badge` parameter to specify what buttons to show.
137147
gh-badge | Select which GitHub buttons to display. Available options are: [star, watch, fork, follow]. You must also use the `gh-repo` parameter to specify the GitHub repo.
148+
layout | What type of page this is (default is `post` for blog posts and `page` for other pages). See _Page types_ section below for more information.
149+
150+
### Advanced parameters
151+
152+
These are advanced parameters that are only useful for people who need very fine control over their website.
153+
154+
Parameter | Description
155+
----------- | -----------
156+
footer-extra | If you want to include extra information in the footer, create an HTML file in the `_includes/` folder (for example `_includes/myinfo.html`) and set `footer-extra` to the name of the file (for example `footer-extra: myinfo.html`)
157+
language | HTML language code to be set on the page's &lt;html&gt; element.
158+
use-site-title | If you want to use the site title rather than the page title as the HTML document title, use `use-site-title: true`.
138159
js | List of local JavaScript files to include in the page (eg. `/assets/js/mypage.js`)
139160
ext-js | List of external JavaScript files to include in the page (eg. `//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js`). External JavaScript files that support [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be specified using the `href` and `sri` parameters eg.<br/>`href: "//code.jquery.com/jquery-3.1.1.min.js"`<br/>`sri: "sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="`
140161
css | List of local CSS files to include in the page

0 commit comments

Comments
 (0)