Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf298e2b

Browse files
authored
Update README.md
1 parente30a885 commitf298e2b

File tree

1 file changed

+67
-27
lines changed

1 file changed

+67
-27
lines changed

‎README.md

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,44 @@ theme: beautiful-jekyll
3737
3838
And finally execute:
3939
40-
$ bundle
40+
```
41+
$ bundle
42+
```
4143

4244
To preview your site, run`bundle exec jekyll serve` (optionally with the`--host 0.0.0.0` flag if needed) and open your browser at`http://localhost:4000`.
4345

4446
##Usage
4547

48+
Using Beautiful-Jekyll is very simple, but you should take a few minutes to read through the features it supports to learn how to use it.
49+
50+
###Adding content
51+
52+
You can now start adding pages to your site. Beautiful-Jekyll supports three layouts:`post`,`page`, and`minimal`. In order to use Beautiful-Jekyll's template, a page must have its`layout` parameter set to one of these options in the YAML. Any blog posts (pages under the`_posts` directory) should use the`post` layout, while most other pages should use the`page` layout. You can use the`minimial` layout if you want a page with minimal styling, without the bulky navigation bar and footer.
4653

54+
Instead of remembering to manually add the layout parameter to every page's YAML, you can add the following lines to your`_config.yml` so that all blog posts will automatically have layout`post` and all other pages will have layout`page`:
55+
56+
```yaml
57+
defaults:
58+
-
59+
scope:
60+
path:""
61+
type:"posts"
62+
values:
63+
layout:"post"
64+
-
65+
scope:
66+
path:""
67+
values:
68+
layout:"page"
4769
```
70+
71+
### Creating a navigation bar
72+
73+
Add these lines to your`_config.yml` file to get a demo navigation bar:
74+
75+
```yaml
4876
navbar-links:
77+
Home: "/"
4978
About Me: "aboutme"
5079
Resources:
5180
- Beautiful Jekyll: "http://deanattali.com/beautiful-jekyll/"
@@ -54,11 +83,21 @@ navbar-links:
5483
Author's home: "http://deanattali.com"
5584
```
5685

57-
```
58-
avatar: "/img/avatar-icon.png"
59-
```
86+
Change these values to match the pages on your site. Each menu item is composed of a `key:value` pair, where the `key` is the text that shows up in the navigation bar, and `value` is the URL to link to. The URL can either be the name of a page on your site (eg. `/` will go to your homepage, `aboutme` will go to a page called `aboutme` on your site), or a URL to an external site beginning in `http`. If you want to define sub-menus, use the format that the `Resource` key uses in the sample code above.
6087

88+
#### Displaying an image in the navigation bar
89+
90+
You can add an image to the navigation bar by defining the `avatar` parameter in `_config.yml`. The image should be a square (width = height).
91+
92+
```yaml
93+
avatar: "/path/to/image.png"
6194
```
95+
96+
### Add your name/email/social media links to the footer
97+
98+
You can add contact information and social media links in the footer. They will be displayed as nice little logos, to give the footer a clean feel. Add the following to your `_config.yml` file:
99+
100+
```yaml
62101
author:
63102
name: Some Person
64103
email: "youremail@domain.com"
@@ -76,15 +115,24 @@ author:
76115
spotify: yourname # eg. daattali
77116
```
78117

79-
```
80-
#Select which share links to show in posts
118+
Remove the lines that you don't want to display in the footer, and change `yourname` to the correct values in the links you want to keep.
119+
120+
### Buttons for sharing blog posts on social media
121+
122+
By default, every blog post will have buttons at the bottom for sharing the page on Twitter, Facebook, LinkedIn, and Google+. If you want to disable these buttons, add these lines to your `_config.yml`:
123+
124+
```yaml
81125
share-links-active:
82-
twitter:true
83-
facebook:true
126+
twitter:false
127+
facebook:false
84128
google: false
85-
linkedin:true
129+
linkedin:false
86130
```
87131

132+
These settings will remove all four buttons. You can use `true` instead of `false` for any buttons that you want to keep.
133+
134+
135+
88136
```
89137
url-pretty: "MyWebsite.com
90138
```
@@ -98,30 +146,15 @@ google_analytics
98146
```
99147
100148
101-
```
102-
defaults:
103-
-
104-
scope:
105-
path: ""
106-
type: "posts"
107-
values:
108-
layout: "post"
109-
-
110-
scope:
111-
path: "" # all files
112-
values:
113-
layout: "page"
114-
```
115149
116150
117151
### Adding an index page
118152
119-
paginate: 5
120-
gems:
121-
- jekyll-paginate
122-
153+
Feel free to create the index page (homepage) of your site however you'd like. If you want to have an index page similar to the one at [deanattali.com](http://deanattali.com), then create `index.html` as follows:
154+
123155
```
124156
---
157+
layout: page
125158
title: My Website
126159
subtitle: Some short description of my site
127160
---
@@ -173,7 +206,14 @@ subtitle: Some short description of my site
173206
{% endif %}
174207
</ul>
175208
{% endif %}
209+
```
176210
211+
You'll also need to add these lines to your `_config.yml` because the code above uses pagination:
212+
213+
```yaml
214+
paginate: 5
215+
gems:
216+
- jekyll-paginate
177217
```
178218

179219
##Contributions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp