Skip to content

Commit

Permalink
add site-js setting
Browse files Browse the repository at this point in the history
  • Loading branch information
daattali committed Sep 12, 2020
1 parent 2128b1c commit 53cf8f0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ One of the major changes in this version is that a lot of time was spent on reth
#### Breaking changes

- Renamed `description` YAML parameter to `share-description` to be more clear
- Renamed `description` config parameter to `rss-description` since it was only used in RSS (the FAQ explains the difference between YAML parameters and config parameters if you're confused)
- Renamed `description` config setting to `rss-description` since it was only used in RSS (the FAQ explains the difference between YAML parameters and config settings if you're confused)
- Removed YAML parameter `use-site-title` (you can now specify the exact title using `share-title`)
- Removed undocumented YAML parameters `meta-title` and `meta-description`
- Removed `link-tags` config parameter because it wasn't necessary. If you use tags, there will now always be a tags page created; if you don't use tags there won't be a tags page.
- The YAML setting `show-avatar` is now true by default. This has always been the case for GitHub Pages users, but not for `remote_theme` users. For consistency, it's now the default for everyone. (#715)
- Removed `link-tags` config setting because it wasn't necessary. If you use tags, there will now always be a tags page created; if you don't use tags there won't be a tags page.
- The YAML parameter `show-avatar` is now true by default. This has always been the case for GitHub Pages users, but not for `remote_theme` users. For consistency, it's now the default for everyone. (#715)

#### New parameters
#### New parameters and settings

- Added `full-width` YAML parameter to allow having full-width pages
- Added `feed_show_excerpt` config parameter to show/hide the post excerpts on the feed page
- Added `feed_show_tags` config parameter to show/hide the list of tags on post previews on the feed page
- Added `feed_show_excerpt` config setting to show/hide the post excerpts on the feed page
- Added `feed_show_tags` config setting to show/hide the list of tags on post previews on the feed page
- Added `share-title` YAML parameter to give control over the search engine/social media title
- Added `before-content` and `after-content` YAML parameters that allow you to add some common HTML before the main content of a page (below the title) or after the main content (above the footer). Works in a similar way to `footer-extra`.
- Added `head-extra` YAML parameter which is similar to `footer-extra` but is used to include custom HTML code in a page's `<head>` tag
- Added `site-js` config setting to provide JavaScript files that are used on all pages in the site

#### New features and improvements

- Improved the `footer-extra` YAML parameter to support multiple files instead of only a single file
- Added automatic navbar color detection (#702)
- Added a blank template CSS file `assets/css/custom.css` that's automatically included in all pages that can be used to overwrite any default Beautiful Jekyll ruless
- When `nav-short` is turned on, the avatar will also be shorter
- Changed navbar and footer background colour to be slightly darker, for better contrast with the default white page background for accessibility reasons
- Changed the behaviour of `site-css` to include site-wide CSS file **before** instead of after page-specific files
Expand All @@ -45,7 +45,7 @@ One of the major changes in this version is that a lot of time was spent on reth
## v4.1.0 (2020-08-08)

- Added Open Graph `site_name` meta field to pages automatically
- Added `text-col `config setting for main text color (#694)
- Added `text-col` config setting for main text color (#694)
- Added `keywords` config setting to set the meta keywords on all pages (for SEO purposes) (#691)
- Added `mobile-theme-col` config setting to allow a mobile theme colour (#692)
- Added `site-css` config setting in the config file to provide CSS files that are used on all pages in the site (#695)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Beautiful Jekyll is used by 50,000+ people with wildly varying degrees of web sk

- ### 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 and modifying the parameters there.
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 and modifying the settings there.

- ### What's the difference between the config file and the YAML parameters?

Expand All @@ -255,7 +255,7 @@ Beautiful Jekyll is used by 50,000+ people with wildly varying degrees of web sk

- ### How do I make small modifications to how my website looks?

If you want to make any visual changes that are not in `_config.yml`, you'll need to add your own CSS rules to the file `assets/css/custom.css` in order to overwrite the default Beautiful Jekyll style. If you don't know how to use CSS, I highly recommend spending 30 minutes to [learn the basics](https://www.w3schools.com/css/).
If you want to make any visual changes that are not in `_config.yml`, you'll need to add your own CSS rules to the file `assets/css/custom-styles.css` and enable the `site-css` setting in the config file. This will allow you to overwrite the default Beautiful Jekyll styles. If you don't know how to use CSS, I highly recommend spending 30 minutes to [learn the basics](https://www.w3schools.com/css/).

- ### How do I use a custom domain for my site?

Expand All @@ -271,7 +271,7 @@ Beautiful Jekyll is used by 50,000+ people with wildly varying degrees of web sk

- ### 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. 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/"`).
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 setting `paginate_path: "/<page name>/page:num/"` (for example `paginate_path: "/blog/page:num/"`).

- ### How do I use math equations in my posts?

Expand Down
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ footer-link-col: "#404040"
# 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. List any custom CSS files here
# For any extra visual customization, you can include additional CSS files in every page on your site. List any custom CSS files here
#site-css:
# - "/assets/css/custom-styles.css"

# If you have common JavaScript files that should be included in every page, list them here
#site-js:
# - "/assets/js/custom-script.js"

# --- Web Analytics Section --- #

# Fill in your Google Analytics gtag.js ID to track your website using gtag
Expand Down
6 changes: 6 additions & 0 deletions _includes/footer-scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
{% endfor %}
{% endif %}

{% if site.site-js %}
{% for js in site.site-js %}
<script src="{{ js | relative_url }}"></script>
{% endfor %}
{% endif %}

{% if page.ext-js %}
{% for js in page.ext-js %}
{% include ext-js.html js=js %}
Expand Down
1 change: 0 additions & 1 deletion assets/css/custom.css

This file was deleted.

0 comments on commit 53cf8f0

Please sign in to comment.