Make theme compatible with remote_theme (#590); fixes #339

This commit is contained in:
Gabriel 2020-04-26 20:31:05 +02:00 committed by GitHub
parent 3de196d57b
commit 4fa9fc8ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 33 additions and 21 deletions

View File

@ -9,5 +9,5 @@ permalink: /404.html
<h1>Move along. (404 error)</h1> <h1>Move along. (404 error)</h1>
<br/> <br/>
<img src="{{ 'img/404-southpark.jpg' | relative_url }}" /> <img src="{{ 'assets/img/404-southpark.jpg' | relative_url }}" />
</div> </div>

View File

@ -32,7 +32,7 @@
Getting started is *literally* as easy as 1-2-3 :smile: Getting started is *literally* as easy as 1-2-3 :smile:
Scroll down to see the steps involved, but here is a 40-second video just as a reference as you work through the steps. Scroll down to see the steps involved, but here is a 40-second video just as a reference as you work through the steps.
![Installation steps](img/install-steps.gif) ![Installation steps](assets/img/install-steps.gif)
### 0. Sign up to GitHub ### 0. Sign up to GitHub
@ -169,6 +169,19 @@ googlefonts | List of Google fonts to include in the page (eg. `["Monoton", "Lob
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.
### Use remote-theme (advanced)
It is possible to use the `remote_theme` feature of GitHub pages. To do so, instead of forking this project:
- Follow all the steps in https://guides.github.com/features/pages/ ***EXCEPT*** the ones where you chose the theme.
- add `remote_theme: daattali/beautiful-jekyll` to your `_config.yml`
- add `paginate: 5` (or any value you'd like) to your `_config.yml`. This is the only configuration value that is required.
- Optionally, if you want to use Staticman, you may need copy `_data/ui-text.yml` into your repo if you want to change the language.
Any folder or file that you don't include in your repository will be included by jekyll on build. If you want toreplace a file (css for instance), you'll just need to place it with the exact same path in own jekyll repo (e.g. `assets/css/main.css`)
### Advanced features (including how to use a custom URL address for your site) ### Advanced features (including how to use a custom URL address for your site)
I wrote [a blog post](https://deanattali.com/2015/03/12/beautiful-jekyll-how-to-build-a-site-in-minutes/) describing some more advanced features that I used in my website that are applicable to any Jekyll site. It describes how I used a custom URL for my site (deanattali.com instead of daattali.github.io), how to add a Google-powered search into your site, and provides a few more details about having an RSS feed. I wrote [a blog post](https://deanattali.com/2015/03/12/beautiful-jekyll-how-to-build-a-site-in-minutes/) describing some more advanced features that I used in my website that are applicable to any Jekyll site. It describes how I used a custom URL for my site (deanattali.com instead of daattali.github.io), how to add a Google-powered search into your site, and provides a few more details about having an RSS feed.

View File

@ -33,7 +33,7 @@ navbar-links:
# Image to show in the navigation bar - works best with a square image # Image to show in the navigation bar - works best with a square image
# Remove this parameter if you don't want an image in the navbar # Remove this parameter if you don't want an image in the navbar
avatar: "/img/avatar-icon.png" avatar: "/assets/img/avatar-icon.png"
# By default, the image is cut into a circle. You can disable this behaviour here. # By default, the image is cut into a circle. You can disable this behaviour here.
round-avatar: true round-avatar: true
@ -102,9 +102,9 @@ footer-link-col: "#404040"
# Alternatively, the navbar, footer, and page background can be set to use background images # Alternatively, the navbar, footer, and page background can be set to use background images
# instead of colour # instead of colour
#navbar-img: "/img/bgimage.png" #navbar-img: "/assets/img/bgimage.png"
#footer-img: "/img/bgimage.png" #footer-img: "/assets/img/bgimage.png"
#page-img: "/img/bgimage.png" #page-img: "/assets/img/bgimage.png"
# --- Web Statistics Section --- # # --- Web Statistics Section --- #
@ -134,6 +134,7 @@ footer-link-col: "#404040"
#fb_comment_id: "" #fb_comment_id: ""
# To use Staticman comments, fill in "repository", "branch", and "endpoint" # To use Staticman comments, fill in "repository", "branch", and "endpoint"
# if using remote_theme, you will need to copy the _data/ui-text.yml to your repository
staticman: staticman:
repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" repository : # GitHub username/repository eg. "daattali/beautiful-jekyll"
branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml`
@ -219,9 +220,7 @@ prose:
- _config.yml - _config.yml
- /_layouts - /_layouts
- /_includes - /_includes
- /css - /assets
- /img
- /js
metadata: metadata:
_posts: _posts:
- name: "layout" - name: "layout"

View File

@ -1,17 +1,17 @@
--- ---
common-css: common-css:
- "/css/bootstrap.min.css" - "/assets/css/bootstrap.min.css"
- "/css/bootstrap-social.css" - "/assets/css/bootstrap-social.css"
- "/css/main.css" - "/assets/css/main.css"
common-ext-css: common-ext-css:
- "//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" - "//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
common-googlefonts: common-googlefonts:
- "Lora:400,700,400italic,700italic" - "Lora:400,700,400italic,700italic"
- "Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" - "Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
common-js: common-js:
- "/js/jquery-1.11.2.min.js" - "/assets/js/jquery-1.11.2.min.js"
- "/js/bootstrap.min.js" - "/assets/js/bootstrap.min.js"
- "/js/main.js" - "/assets/js/main.js"
--- ---
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -1,10 +1,10 @@
--- ---
common-css: common-css:
- "/css/bootstrap.min.css" - "/assets/css/bootstrap.min.css"
- "/css/main-minimal.css" - "/assets/css/main-minimal.css"
common-js: common-js:
- "/js/jquery-1.11.2.min.js" - "/assets/js/jquery-1.11.2.min.js"
- "/js/bootstrap.min.js" - "/assets/js/bootstrap.min.js"
--- ---
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: First post! title: First post!
image: /img/hello_world.jpeg image: /assets/img/hello_world.jpeg
--- ---
This is my first post, how exciting! This is my first post, how exciting!

View File

@ -2,7 +2,7 @@
layout: post layout: post
title: Flake it till you make it title: Flake it till you make it
subtitle: Excerpt from Soulshaping by Jeff Brown subtitle: Excerpt from Soulshaping by Jeff Brown
bigimg: /img/path.jpg bigimg: /assets/img/path.jpg
tags: [books, test] tags: [books, test]
--- ---

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 785 KiB

After

Width:  |  Height:  |  Size: 785 KiB

View File

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 262 KiB