Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
dafbc28377 | |||
82c60effed | |||
5490b4841d | |||
332a3adaa2 | |||
ac04e14954 | |||
8c0156c1af | |||
ed31f79fb6 | |||
c4a397509c | |||
c5f49a65ad | |||
6163756baa | |||
741f7378bd | |||
3021233850 | |||
6e2442157f | |||
585129f2f3 | |||
9128b55257 | |||
c627df96ff | |||
bfc6dcdd0a | |||
fccc38afb3 | |||
8e3b90791b | |||
11b9f23b5b | |||
278dc5efab | |||
dfadb533bb |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,12 @@
|
|||||||
|
## v4.1.0 2020-08-08
|
||||||
|
|
||||||
|
- Add Open Graph `site_name` field
|
||||||
|
- Add `text-col `config setting for main text color (#694)
|
||||||
|
- Add `keywords` config setting to set the meta keywords on all pages (for SEO purposes) (#691)
|
||||||
|
- Add `mobile-theme-col` config setting to allow a mobile theme colour (#692)
|
||||||
|
- Add `site-css` config setting in the config file to provide CSS files that are used on all pages in the site (#695)
|
||||||
|
- Add YAML option `description`: creates the meta description on a page, intended to provide a brief description of the page for search engines and when the page is shared (#690)
|
||||||
|
|
||||||
## v4.0.1 2020-07-13
|
## v4.0.1 2020-07-13
|
||||||
|
|
||||||
- Fixed staticman comments UI that was broken since the migration to bootstrap 4
|
- Fixed staticman comments UI that was broken since the migration to bootstrap 4
|
||||||
@ -130,3 +139,4 @@
|
|||||||
... Many small changes because the site was in its infancy
|
... Many small changes because the site was in its infancy
|
||||||
|
|
||||||
**2015-03-12** Beautiful Jekyll version 0.0000001 is released!
|
**2015-03-12** Beautiful Jekyll version 0.0000001 is released!
|
||||||
|
|
||||||
|
43
README.md
43
README.md
@ -1,14 +1,15 @@
|
|||||||
|
[](https://xscode.com/daattali/beautiful-jekyll)
|
||||||
|
|
||||||
# Beautiful Jekyll
|
# Beautiful Jekyll
|
||||||
|
|
||||||
[](https://xscode.com/daattali/beautiful-jekyll)
|
[](https://xscode.com/daattali/beautiful-jekyll)
|
||||||
[](https://badge.fury.io/rb/beautiful-jekyll-theme)
|
[](https://badge.fury.io/rb/beautiful-jekyll-theme)
|
||||||
[](https://github.com/daattali/beautiful-jekyll/actions?query=branch%3Amaster+event%3Apush+workflow%3A%22Beautiful+Jekyll+CI%22)
|
|
||||||
|
|
||||||
> *Copyright 2020 [Dean Attali](https://deanattali.com)*
|
> *Created by [Dean Attali](https://deanattali.com)* · [Demo](https://beautifuljekyll.com/)
|
||||||
|
|
||||||
**Beautiful Jekyll** is a ready-to-use template to help you create a beautiful website quickly. Perfect for personal sites, blogs, or simple project websites. [Check out a demo](https://beautifuljekyll.com) of what you'll get after just two minutes. You can also look at [my personal website](https://deanattali.com) to see it in use, or see examples of websites other people created using this theme [below](#showcased-users-success-stories).
|
**Beautiful Jekyll** is a ready-to-use template to help you create a beautiful website quickly. Perfect for personal sites, blogs, or simple project websites. [Check out a demo](https://beautifuljekyll.com) of what you'll get after just two minutes. You can also look at [my personal website](https://deanattali.com) to see it in use, or see examples of websites other people created using this theme [below](#showcased-users-success-stories).
|
||||||
|
|
||||||
**If you enjoy this theme, please consider [sponsoring me](https://github.com/sponsors/daattali) for developing and maintaining it for over 5 years.**
|
**If you enjoy this theme, please consider [supporting me](https://github.com/sponsors/daattali) for developing and maintaining it for over 5 years.**
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a style="display: inline-block;" href="https://github.com/sponsors/daattali">
|
<a style="display: inline-block;" href="https://github.com/sponsors/daattali">
|
||||||
@ -122,7 +123,7 @@ If you don't include YAML then your file will not use this template.
|
|||||||
|
|
||||||
Below is a list of the parameters that **Beautiful Jekyll** supports (any of these can be added to the YAML front matter of any page). Remember to also look in the `_config.yml` file to see additional settings.
|
Below is a list of the parameters that **Beautiful Jekyll** supports (any of these can be added to the YAML front matter of any page). Remember to also look in the `_config.yml` file to see additional settings.
|
||||||
|
|
||||||
## Main paramaters
|
## Main parameters
|
||||||
|
|
||||||
These are the basic YAML parameters that you are most likely to use on most pages.
|
These are the basic YAML parameters that you are most likely to use on most pages.
|
||||||
|
|
||||||
@ -149,6 +150,7 @@ nav-short | By default, the navigation bar gets shorter after scrolling down t
|
|||||||
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-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.
|
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.
|
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.
|
||||||
|
description | A brief description of the page (used in search engines and when the page is shared).
|
||||||
|
|
||||||
## Advanced parameters
|
## Advanced parameters
|
||||||
|
|
||||||
@ -174,7 +176,7 @@ ext-css | List of external CSS files to include in the page. External CSS f
|
|||||||
|
|
||||||
# Showcased users (success stories!)
|
# Showcased users (success stories!)
|
||||||
|
|
||||||
Beautiful Jekyll has been used in over 500 websites in its first 6 months, and tens of thousands of times since its inception. Here is a sample of some websites that use Beautiful Jekyll.
|
Beautiful Jekyll has been used in tens of thousands of websites since 2015. Here is a sample of some websites that use Beautiful Jekyll. If you'd like to showcase yourself and join this list, any level of [sponsorship](https://github.com/sponsors/daattali) will grant you that perk!
|
||||||
|
|
||||||
## Project/company websites
|
## Project/company websites
|
||||||
|
|
||||||
@ -217,7 +219,19 @@ Beautiful Jekyll is actively used by thousands of people with wildly varying deg
|
|||||||
|
|
||||||
**If you really wany my personal help, please visit https://xscode.com/daattali/beautiful-jekyll to hire my services.**
|
**If you really wany my personal help, please visit https://xscode.com/daattali/beautiful-jekyll to hire my services.**
|
||||||
|
|
||||||
### What if I don't want the website to be `https://<yourusername>.github.io`?
|
- ### How do I add a favicon to my site?
|
||||||
|
|
||||||
|
Easy! Just place a valid `favicon.ico` in the root directory of your project. And then wait! It can take a while to update.
|
||||||
|
|
||||||
|
- ### How do I change the number of posts per page OR the colour of the navigation bar OR the image in the navigation bar OR ...?
|
||||||
|
|
||||||
|
Beautiful Jekyll is built to be very customizable, and as such, many questions about "how do I change ..." can be answered by looking at the `_config.yml` file. The configuration file has many adjustable parameters to customize your site.
|
||||||
|
|
||||||
|
- ### What if I want to use a custom domain for my site?
|
||||||
|
|
||||||
|
GitHub lets you have your website for free using their `github.io` domain. If you want your own domain (such as `https://myname.com`), it's easy and will cost about $10-$15 per year. First you need to buy a domain name (I recommend [Namecheap](https://namecheap.pxf.io/daattali)) and then follow the [instructions GitHub provides](https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site).
|
||||||
|
|
||||||
|
- ### What if I want a free domain, but not `https://<yourusername>.github.io`?
|
||||||
|
|
||||||
Every GitHub user can have one repository (repository = project) named `<yourusername>.github.io` and the website for that repository will be `https://<yourusername>.github.io`.
|
Every GitHub user can have one repository (repository = project) named `<yourusername>.github.io` and the website for that repository will be `https://<yourusername>.github.io`.
|
||||||
|
|
||||||
@ -225,23 +239,15 @@ If you want your project to be named something else, for example `MyAwesomeProje
|
|||||||
|
|
||||||
Now your website will be at `https://<yourusername>.github.io\MyAwesomeProject`.
|
Now your website will be at `https://<yourusername>.github.io\MyAwesomeProject`.
|
||||||
|
|
||||||
### How do I change the number of posts per page OR the colour of the navigation bar OR the image in the navigation bar OR ...?
|
- ### How do I move the blog to another page instead of having it on the home page?
|
||||||
|
|
||||||
Beautiful Jekyll is built to be very customizable, and as such, many questions about "how do I change ..." can be answered by looking at the `_config.yml` file. The configuration file has many adjustable parameters to customize your site.
|
The default style of Beautiful Jekyll is to feature the blog feed on the front page. For some 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 `<mysite.com>/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 name>/page:num/"` (for example `paginate_path: "/blog/page:num/"`).
|
||||||
|
|
||||||
### How do I add a favicon to my site?
|
- ### What size do you recommend using for the `cover-img` photos?
|
||||||
|
|
||||||
Easy! Just place a valid `favicon.ico` in the root directory of your project. And then wait! It can take a while to update.
|
|
||||||
|
|
||||||
### How do I move the blog to another page instead of having it on the home page?
|
|
||||||
|
|
||||||
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 `<mysite.com>/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 name>/page:num/"` (for example `paginate_path: "/blog/page:num/"`).
|
|
||||||
|
|
||||||
### 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.
|
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.
|
||||||
|
|
||||||
### How do I use MathJax equations in my posts?
|
- ### How do I use math equations in my posts?
|
||||||
|
|
||||||
MathJax can be easily integrated into your website with a one-line addition. You can see [this discussion](https://github.com/daattali/beautiful-jekyll/issues/195) for more information.
|
MathJax can be easily integrated into your website with a one-line addition. You can see [this discussion](https://github.com/daattali/beautiful-jekyll/issues/195) for more information.
|
||||||
|
|
||||||
@ -260,3 +266,4 @@ I'd also like to thank [Dr. Jekyll's Themes](https://drjekyllthemes.github.io/),
|
|||||||
# Known limitations
|
# Known limitations
|
||||||
|
|
||||||
- If there are many navigation bar links and an avatar, some of the links may get partially hidden behind the avatar. I suggest either re-thinking the number of links, or not using an avatar.
|
- If there are many navigation bar links and an avatar, some of the links may get partially hidden behind the avatar. I suggest either re-thinking the number of links, or not using an avatar.
|
||||||
|
|
||||||
|
14
_config.yml
14
_config.yml
@ -80,14 +80,18 @@ link-tags: true
|
|||||||
# Excerpt Word Length - Truncates the excerpt to the specified number of words on the index page
|
# Excerpt Word Length - Truncates the excerpt to the specified number of words on the index page
|
||||||
excerpt_length: 50
|
excerpt_length: 50
|
||||||
|
|
||||||
|
# The keywords to associate with your website, for SEO purposes
|
||||||
|
#keywords: "my,list,of,keywords"
|
||||||
|
|
||||||
# --- Colours / background image --- #
|
# --- Colours / background image --- #
|
||||||
|
|
||||||
# Personalize the colors in your website. Colour values can be any valid CSS colour
|
# Personalize the colours in your website. Colour values can be any valid CSS colour
|
||||||
|
|
||||||
navbar-col: "#F5F5F5"
|
navbar-col: "#F5F5F5"
|
||||||
navbar-text-col: "#404040"
|
navbar-text-col: "#404040"
|
||||||
navbar-border-col: "#EAEAEA"
|
navbar-border-col: "#EAEAEA"
|
||||||
page-col: "#FFFFFF"
|
page-col: "#FFFFFF"
|
||||||
|
text-col: "#404040"
|
||||||
link-col: "#008AFF"
|
link-col: "#008AFF"
|
||||||
hover-col: "#0085A1"
|
hover-col: "#0085A1"
|
||||||
footer-col: "#F5F5F5"
|
footer-col: "#F5F5F5"
|
||||||
@ -101,6 +105,13 @@ footer-link-col: "#404040"
|
|||||||
#footer-img: "/assets/img/bgimage.png"
|
#footer-img: "/assets/img/bgimage.png"
|
||||||
#page-img: "/assets/img/bgimage.png"
|
#page-img: "/assets/img/bgimage.png"
|
||||||
|
|
||||||
|
# Suggest a colour for mobile browsers to use as the browser's theme. This is only supported by a few mobile browsers.
|
||||||
|
#mobile-theme-col: "#0085A1"
|
||||||
|
|
||||||
|
# For any extra customization, you can include additional CSS files in every page on your site
|
||||||
|
#site-css:
|
||||||
|
# - "/assets/css/custom-styles.css"
|
||||||
|
|
||||||
# --- Web Statistics Section --- #
|
# --- Web Statistics Section --- #
|
||||||
|
|
||||||
# Fill in your Google Analytics gtag.js ID to track your website using gtag
|
# Fill in your Google Analytics gtag.js ID to track your website using gtag
|
||||||
@ -212,3 +223,4 @@ plugins:
|
|||||||
|
|
||||||
# Beautiful Jekyll / Dean Attali
|
# Beautiful Jekyll / Dean Attali
|
||||||
# 2fc73a3a967e97599c9763d05e564189
|
# 2fc73a3a967e97599c9763d05e564189
|
||||||
|
|
||||||
|
@ -8,10 +8,20 @@
|
|||||||
<meta name="author" content="{{ site.author }}">
|
<meta name="author" content="{{ site.author }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.subtitle %}
|
{% if page.description %}
|
||||||
|
<meta name="description" content="{{ page.description }}">
|
||||||
|
{% elsif page.subtitle %}
|
||||||
<meta name="description" content="{{ page.subtitle }}">
|
<meta name="description" content="{{ page.subtitle }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.mobile-theme-col %}
|
||||||
|
<meta name="theme-color" content="{{ site.mobile-theme-col }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.keywords %}
|
||||||
|
<meta name="keywords" content="{{ site.keywords }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title | default: 'Untitled' }} {{ site.title-separator | default: '-' }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}">
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title | default: 'Untitled' }} {{ site.title-separator | default: '-' }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}">
|
||||||
|
|
||||||
{% include gtag.html %}
|
{% include gtag.html %}
|
||||||
@ -42,11 +52,21 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.site-css %}
|
||||||
|
{% for css in site.site-css %}
|
||||||
|
<link rel="stylesheet" href="{{ css | relative_url }}">
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Facebook OpenGraph tags -->
|
<!-- Facebook OpenGraph tags -->
|
||||||
{% if site.fb_app_id %}
|
{% if site.fb_app_id %}
|
||||||
<meta property="fb:app_id" content="{{ site.fb_app_id }}">
|
<meta property="fb:app_id" content="{{ site.fb_app_id }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.title %}
|
||||||
|
<meta property="og:site_name" content="{{ site.title }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if page.meta-title %}
|
{% if page.meta-title %}
|
||||||
<meta property="og:title" content="{{ page.meta-title }}">
|
<meta property="og:title" content="{{ page.meta-title }}">
|
||||||
{% elsif page.title %}
|
{% elsif page.title %}
|
||||||
|
@ -13,7 +13,7 @@ html {
|
|||||||
body {
|
body {
|
||||||
font-family: 'Lora', 'Times New Roman', serif;
|
font-family: 'Lora', 'Times New Roman', serif;
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
color: #404040;
|
color: {{ site.text-col | default: "#404040" }};
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: {{ site.page-col | default: "#FFFFFF" }};
|
background-color: {{ site.page-col | default: "#FFFFFF" }};
|
||||||
{% if site.page-img %}
|
{% if site.page-img %}
|
||||||
@ -447,7 +447,7 @@ footer .footer-custom-content {
|
|||||||
|
|
||||||
.post-preview a {
|
.post-preview a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #404040;
|
color: {{ site.text-col | default: "#404040" }};
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-preview a:focus,
|
.post-preview a:focus,
|
||||||
@ -761,7 +761,7 @@ footer .footer-custom-content {
|
|||||||
padding: 0.625rem 0.3125rem;
|
padding: 0.625rem 0.3125rem;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
color: #404040;
|
color: {{ site.text-col | default: "#404040" }};
|
||||||
}
|
}
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.pagination .page-item .page-link {
|
.pagination .page-item .page-link {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "beautiful-jekyll-theme"
|
spec.name = "beautiful-jekyll-theme"
|
||||||
spec.version = "4.0.1"
|
spec.version = "4.1.0"
|
||||||
spec.authors = ["Dean Attali"]
|
spec.authors = ["Dean Attali"]
|
||||||
spec.email = ["daattali@gmail.com"]
|
spec.email = ["daattali@gmail.com"]
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|||||||
spec.homepage = "https://beautifuljekyll.com"
|
spec.homepage = "https://beautifuljekyll.com"
|
||||||
spec.license = "MIT"
|
spec.license = "MIT"
|
||||||
|
|
||||||
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|LICENSE|README|feed|404|_data|tags|stfaticman)}i) }
|
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|LICENSE|README|feed|404|_data|tags|staticman)}i) }
|
||||||
|
|
||||||
spec.metadata = {
|
spec.metadata = {
|
||||||
"changelog_uri" => "https://github.com/daattali/beautiful-jekyll/blob/master/CHANGELOG.md",
|
"changelog_uri" => "https://github.com/daattali/beautiful-jekyll/blob/master/CHANGELOG.md",
|
||||||
@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|||||||
spec.add_runtime_dependency "jekyll", "~> 3.8"
|
spec.add_runtime_dependency "jekyll", "~> 3.8"
|
||||||
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
|
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
|
||||||
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4"
|
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4"
|
||||||
|
spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1"
|
||||||
|
|
||||||
spec.add_development_dependency "bundler", ">= 1.16"
|
spec.add_development_dependency "bundler", ">= 1.16"
|
||||||
spec.add_development_dependency "rake", "~> 12.0"
|
spec.add_development_dependency "rake", "~> 12.0"
|
||||||
|
Reference in New Issue
Block a user