Browse Source

simplify YAML params and readme

Dean Attali 3 years ago
parent
commit
757206b082
7 changed files with 24 additions and 27 deletions
  1. 11
    12
      README.md
  2. 6
    8
      _config.yml
  3. 2
    2
      _includes/head.html
  4. 2
    2
      _layouts/page.html
  5. 1
    1
      aboutme.md
  6. 1
    1
      feed.xml
  7. 1
    1
      index.html

+ 11
- 12
README.md View File

@@ -68,18 +68,17 @@ Many personalization settings in `_config.yml`, such as setting your avatar to a
68 68
 
69 69
 There are all the parameters you can place inside a page's YAML front matter that **Beautiful Jekyll** supports.
70 70
 
71
-Parameter   | Page types supported | Description
72
-------------| -------------------- | -----------
73
-layout      | all                  | What type of page this is
74
-title       | all                  | Page title
75
-subtitle    | post                 | Short subtitle
76
-description | page                 | Short description of page
77
-date        | minimal              | Date to show in the mini footer
78
-js          | all                  | List of local JavaScript files to include in the page (eg. `/js/mypage.js`)
79
-ext-js      | all                  | List of external JavaScript files to include in the page (eg. `//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js`)
80
-css         | all                  | List of local CSS files to include in the page
81
-ex-css      | all                  | List of external CSS files to include in the page
82
-googlefonts | all                  | List of Google fonts to include in the page (eg. `["Monoton", "Lobster"]`)
71
+Parameter   | Description
72
+----------- | -----------
73
+layout      | What type of page this is (recommended options are `page`, `post`, or `minimal`)
74
+title       | Page or blog post title
75
+subtitle    | Short description of page or blog post
76
+keywords    | Comma-separated list of keywords for the current page (eg. "soccer, sports, barcelona, messi")
77
+js          | List of local JavaScript files to include in the page (eg. `/js/mypage.js`)
78
+ext-js      | List of external JavaScript files to include in the page (eg. `//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js`)
79
+css         | List of local CSS files to include in the page
80
+ex-css      | List of external CSS files to include in the page
81
+googlefonts | List of Google fonts to include in the page (eg. `["Monoton", "Lobster"]`)
83 82
 
84 83
 ### Project page vs user page
85 84
 

+ 6
- 8
_config.yml View File

@@ -13,15 +13,18 @@ baseurl: ""
13 13
 
14 14
 # Of course don't forget to change the username and projectname to YOUR username and project
15 15
 
16
+# Name of website
17
+title: My website
18
+
19
+# Short description of your site
20
+description: A virtual proof that name is awesome!
21
+
16 22
 # --- Navigation bar options --- #
17 23
 
18 24
 # Image to show in the navigation bar - image must be a square (width = height)
19 25
 # Remove this parameter if you don't want an image in the navbar
20 26
 avatar: "/img/avatar-icon.png"
21 27
 
22
-# Name of website to show in the navigation bar
23
-title: My website
24
-
25 28
 # List of links in the navigation bar
26 29
 navbar-links:
27 30
   Home: ""
@@ -55,11 +58,6 @@ footer-links-active:
55 58
 # Remove this if you don't want a link in the footer
56 59
 url-pretty: "MyWebsite.com"  # eg. "deanattali.com/beautiful-jekyll"
57 60
 
58
-# --- Header meta --- #
59
-# Brief name and description of the site
60
-name: name's website
61
-description: A virtual proof that name is awesome!
62
- 
63 61
 # --- Misc --- #
64 62
 
65 63
 # Fill in your Disqus shortname (NOT the userid) if you want to support Disqus comments

+ 2
- 2
_includes/head.html View File

@@ -3,12 +3,12 @@
3 3
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
4 4
   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
5 5
 
6
-  <title>{% if page.title %}{{ page.title }}{% else %}{{ site.name }}{% endif %}</title>
6
+  <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7 7
 
8 8
   <meta name="author" content="{{ site.author.name }}" />
9 9
   <meta name="description" content="{{ site.description }}">
10 10
 
11
-  <link rel="alternate" type="application/rss+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
11
+  <link rel="alternate" type="application/rss+xml" title="{{ site.title }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
12 12
 
13 13
   {% if page.common-ext-css %}
14 14
     {% for css in page.common-ext-css %}

+ 2
- 2
_layouts/page.html View File

@@ -8,9 +8,9 @@ layout: default
8 8
     <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
9 9
 	  <div class="page-heading">
10 10
 	    <h1>{{ page.title }}</h1>
11
-	    {% if page.description %}
11
+	    {% if page.subtitle %}
12 12
 	    <hr class="small">
13
-	    <span class="page-subheading">{{ page.description }}</span>
13
+	    <span class="page-subheading">{{ page.subtitle }}</span>
14 14
 	    {% endif %}
15 15
 	  </div>
16 16
     </div>

+ 1
- 1
aboutme.md View File

@@ -1,7 +1,7 @@
1 1
 ---
2 2
 layout: page
3 3
 title: About me
4
-description: Why you'd want to go on a date with me
4
+subtitle: Why you'd want to go on a date with me
5 5
 ---
6 6
 
7 7
 My name is Inigo Montoya. I have the following qualities:

+ 1
- 1
feed.xml View File

@@ -4,7 +4,7 @@ layout: null
4 4
 <?xml version="1.0" encoding="UTF-8"?>
5 5
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6 6
   <channel>
7
-    <title>{{ site.name | xml_escape }}</title>
7
+    <title>{{ site.title | xml_escape }}</title>
8 8
     <description>{{ site.description | xml_escape }}</description>
9 9
     <link>{{ site.url }}</link>
10 10
     <atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />

+ 1
- 1
index.html View File

@@ -1,7 +1,7 @@
1 1
 ---
2 2
 layout: page
3 3
 title: My website
4
-description: This is where I will tell my friends way too much about me
4
+subtitle: This is where I will tell my friends way too much about me
5 5
 ---
6 6
 
7 7
 <div class="main-explain-area jumbotron">