Skip to content

Commit 4fa9fc8

Browse files
authored
Make theme compatible with remote_theme (daattali#590); fixes daattali#339
1 parent 3de196d commit 4fa9fc8

30 files changed

+33
-21
lines changed

404.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ <h1>Whoops, this page doesn't exist.</h1>
99
<h1>Move along. (404 error)</h1>
1010
<br/>
1111

12-
<img src="{{ 'img/404-southpark.jpg' | relative_url }}" />
12+
<img src="{{ 'assets/img/404-southpark.jpg' | relative_url }}" />
1313
</div>

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
Getting started is *literally* as easy as 1-2-3 :smile:
3333
Scroll down to see the steps involved, but here is a 40-second video just as a reference as you work through the steps.
3434

35-
![Installation steps](img/install-steps.gif)
35+
![Installation steps](assets/img/install-steps.gif)
3636

3737
### 0. Sign up to GitHub
3838

@@ -169,6 +169,19 @@ googlefonts | List of Google fonts to include in the page (eg. `["Monoton", "Lob
169169
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.
170170
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.
171171

172+
### Use remote-theme (advanced)
173+
174+
It is possible to use the `remote_theme` feature of GitHub pages. To do so, instead of forking this project:
175+
176+
- Follow all the steps in https://guides.github.com/features/pages/ ***EXCEPT*** the ones where you chose the theme.
177+
- add `remote_theme: daattali/beautiful-jekyll` to your `_config.yml`
178+
- add `paginate: 5` (or any value you'd like) to your `_config.yml`. This is the only configuration value that is required.
179+
- 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.
180+
181+
182+
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`)
183+
184+
172185
### Advanced features (including how to use a custom URL address for your site)
173186

174187
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.

_config.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ navbar-links:
3333

3434
# Image to show in the navigation bar - works best with a square image
3535
# Remove this parameter if you don't want an image in the navbar
36-
avatar: "/img/avatar-icon.png"
36+
avatar: "/assets/img/avatar-icon.png"
3737

3838
# By default, the image is cut into a circle. You can disable this behaviour here.
3939
round-avatar: true
@@ -102,9 +102,9 @@ footer-link-col: "#404040"
102102
# Alternatively, the navbar, footer, and page background can be set to use background images
103103
# instead of colour
104104

105-
#navbar-img: "/img/bgimage.png"
106-
#footer-img: "/img/bgimage.png"
107-
#page-img: "/img/bgimage.png"
105+
#navbar-img: "/assets/img/bgimage.png"
106+
#footer-img: "/assets/img/bgimage.png"
107+
#page-img: "/assets/img/bgimage.png"
108108

109109
# --- Web Statistics Section --- #
110110

@@ -134,6 +134,7 @@ footer-link-col: "#404040"
134134
#fb_comment_id: ""
135135

136136
# To use Staticman comments, fill in "repository", "branch", and "endpoint"
137+
# if using remote_theme, you will need to copy the _data/ui-text.yml to your repository
137138
staticman:
138139
repository : # GitHub username/repository eg. "daattali/beautiful-jekyll"
139140
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:
219220
- _config.yml
220221
- /_layouts
221222
- /_includes
222-
- /css
223-
- /img
224-
- /js
223+
- /assets
225224
metadata:
226225
_posts:
227226
- name: "layout"

_layouts/base.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
common-css:
3-
- "/css/bootstrap.min.css"
4-
- "/css/bootstrap-social.css"
5-
- "/css/main.css"
3+
- "/assets/css/bootstrap.min.css"
4+
- "/assets/css/bootstrap-social.css"
5+
- "/assets/css/main.css"
66
common-ext-css:
77
- "//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
88
common-googlefonts:
99
- "Lora:400,700,400italic,700italic"
1010
- "Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
1111
common-js:
12-
- "/js/jquery-1.11.2.min.js"
13-
- "/js/bootstrap.min.js"
14-
- "/js/main.js"
12+
- "/assets/js/jquery-1.11.2.min.js"
13+
- "/assets/js/bootstrap.min.js"
14+
- "/assets/js/main.js"
1515
---
1616

1717
<!DOCTYPE html>

_layouts/minimal.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
common-css:
3-
- "/css/bootstrap.min.css"
4-
- "/css/main-minimal.css"
3+
- "/assets/css/bootstrap.min.css"
4+
- "/assets/css/main-minimal.css"
55
common-js:
6-
- "/js/jquery-1.11.2.min.js"
7-
- "/js/bootstrap.min.js"
6+
- "/assets/js/jquery-1.11.2.min.js"
7+
- "/assets/js/bootstrap.min.js"
88
---
99

1010
<!DOCTYPE html>

_posts/2015-01-04-first-post.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: post
33
title: First post!
4-
image: /img/hello_world.jpeg
4+
image: /assets/img/hello_world.jpeg
55
---
66

77
This is my first post, how exciting!

_posts/2015-02-26-flake-it-till-you-make-it.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: Flake it till you make it
44
subtitle: Excerpt from Soulshaping by Jeff Brown
5-
bigimg: /img/path.jpg
5+
bigimg: /assets/img/path.jpg
66
tags: [books, test]
77
---
88

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)