diff --git a/README.md b/README.md index b55cd64..6f2d216 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ ### Table of contents - [Features](#features) -- [Build your website in 3 steps](#build-your-website-in-3-steps) +- [**Build your website in 3 steps**](#build-your-website-in-3-steps) - [Add your own content](#add-your-own-content) -- [Last important thing: parameters for each page](#last-important-thing-parameters-for-each-page) -- [Supported YAML front matter parameters](#supported-yaml-front-matter-parameters) +- [Customizing parameters for each page](#customizing-parameters-for-each-page) +- [Supported parameters](#supported-parameters) - [Showcased users (success stories!)](#showcased-users-success-stories) - [FAQ and support](#faq-and-support) - [Credits and contributions](#credits) @@ -34,12 +34,11 @@ - **SIMPLE**: The primary goal of Beautiful Jekyll is to allow literally *anyone* to create a website in a few minutes. - **Mobile-first**: Designed to look great on both large-screen and small-screen (mobile) devices. - **Highly customizable**: Many personalization settings such as changing the background colour/image, adding a logo. -- **Two-level navigation menu**: If you have many pages and your menu is getting cluttered, separate your menu into two levels. -- **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. +- **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. - **Battle-tested**: By using Beautiful Jekyll, you'll be joining tens of thousands of users who used this theme since 2015. - **Links to your social media**: You can easily add links to any of your social media accounts in the footer of every page. -- **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). -- **Sharing blog posts on social media**: By default, all blog posts have buttons to allow people to share on Twitter/Facebook/LinkedIn. +- **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). +- **Share blog posts on social media**: By default, all blog posts have buttons to allow people to share on Twitter/Facebook/LinkedIn. - **Tags**: Any blog post can be tagged with keywords, and an index page showing all the tags is automatically generated. - **Tracking analytics**: Easily integrate Google Analytics, or other analytics platforms, to track visits to your website. - **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 ## Add your own content -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! +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. + +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! 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. +Any markdown or HTML file that you create will be available on your website under `https://.github.io/`. For example, if you create a file `about.md` (or `about.html`) then it'll exist at `https://.github.io/about`. + 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. -## Last important thing: parameters for each page +## Customizing parameters for each page -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: +**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: ``` --- @@ -112,29 +115,47 @@ You can look at the top of [`aboutme.md`](https://raw.githubusercontent.com/daat If you don't include YAML then your file will not use this template. -## Supported YAML front matter parameters +## Supported parameters -These are the main parameters you can place inside a page's YAML front matter that **Beautiful Jekyll** supports. +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. + +### Main paramaters + +These are the simple YAML parameters that you are most likely to use on most page. Parameter | Description ----------- | ----------- title | Page or blog post title subtitle | Short description of page or blog post that goes under the title -tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, self help, finance]` -bigimg | 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). -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. -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`. -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`. -readtime | If you want to show how many minutes it will take to read a post in the header, add `readtime: true`. +tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, analysis, finance]` +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). +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`. + +### Less commonly used parameters + +These are parameters that you may not use often, but can come in handy for some people. + +Parameter | Description +----------- | ----------- +readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`. +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`. +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`. 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. -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). -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`) +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`. 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` -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. -language | HTML language code to be set on <html> 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`. -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. 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. 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. +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. + +### Advanced parameters + +These are advanced parameters that are only useful for people who need very fine control over their website. + +Parameter | Description +----------- | ----------- +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`) +language | HTML language code to be set on the page's <html> element. +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`. js | List of local JavaScript files to include in the page (eg. `/assets/js/mypage.js`) 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.
`href: "//code.jquery.com/jquery-3.1.1.min.js"`
`sri: "sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="` css | List of local CSS files to include in the page @@ -212,7 +233,7 @@ Easy! Just place a valid `favicon.ico` in the root directory of your project. An The default style of Beautiful Jekyll is to feature the blog feed on the front page. But for many sites that's not the ideal structure, and you may want to have a separate dedicated page for the blog posts. To have the blog hosted on a different URL (for example at `/blog`), copy the `index.html` file into a folder with the same name as the desired page (for example, to `blog/index.html`), and in the `_config.yml` file you need to add a parameter `paginate_path: "//page:num/"` (for example `paginate_path: "/blog/page:num/"`). -#### What size do you recommend using for the `bigimg` photos? +#### What size do you recommend using for the `cover-img` photos? Unfortunately, this is a no-answer! There isn't a one-size-fits-all solution to this, because every person will view your site on a different browser with different dimensions. Some browsers will have very wide aspect ratio, some will be narrower, some will be vertical (such as phones), different phones have different screens, etc. The image will always be centered, so the only tip I can give is that you should make sure the important part of the image is in the middle so that it'll always show. Other than that, every browser will show a different clipping of the image. diff --git a/_config.yml b/_config.yml index fc6e3a5..58b9ab0 100644 --- a/_config.yml +++ b/_config.yml @@ -82,7 +82,7 @@ excerpt_length: 50 navbar-col: "#F5F5F5" navbar-text-col: "#404040" -navbar-children-col: "#F5F5F5" +navbar-border-col: "#EAEAEA" page-col: "#FFFFFF" link-col: "#008AFF" hover-col: "#0085A1" diff --git a/_includes/disqus.html b/_includes/disqus.html index a0e4a02..d1c5575 100644 --- a/_includes/disqus.html +++ b/_includes/disqus.html @@ -1,19 +1,19 @@ {%- if site.disqus -%}
-
+
-
+
{%- endif -%} diff --git a/_includes/ext-css.html b/_includes/ext-css.html index 3becb23..c177a7c 100644 --- a/_includes/ext-css.html +++ b/_includes/ext-css.html @@ -1,7 +1,7 @@ {% if include.css.sri %} {% elsif include.css.href %} - + {% else %} - + {% endif %} diff --git a/_includes/fb-comment.html b/_includes/fb-comment.html index f358061..d29682c 100644 --- a/_includes/fb-comment.html +++ b/_includes/fb-comment.html @@ -1,14 +1,16 @@ {%- if site.fb_comment_id -%}
-
- -
- +
+ +
+
{%- endif -%} diff --git a/_includes/footer-minimal.html b/_includes/footer-minimal.html index f1bef84..c6a5af5 100644 --- a/_includes/footer-minimal.html +++ b/_includes/footer-minimal.html @@ -1,18 +1,18 @@
- {% if site.author %} - {{ site.author }} -   •   - {% endif %} - {% if page.date %} - {{ page.date }} - {% else %} - {{ site.time | date: '%Y' }} - {% endif %} + {% if site.author %} + {{ site.author }} +   •   + {% endif %} + {% if page.date %} + {{ page.date }} + {% else %} + {{ site.time | date: '%Y' }} + {% endif %} {% if site.url-pretty %} -   •   - {{ site.url-pretty }} +   •   + {{ site.url-pretty }} {% endif %}
diff --git a/_includes/footer-scripts.html b/_includes/footer-scripts.html index 8b36e48..a87f0be 100644 --- a/_includes/footer-scripts.html +++ b/_includes/footer-scripts.html @@ -9,9 +9,9 @@ {% if js contains 'jquery' %} {% else %} diff --git a/_includes/footer.html b/_includes/footer.html index 5e849d1..91ff90d 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,7 +1,7 @@