octopress-assign-tag 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -2
- data/README.md +22 -14
- data/lib/octopress-assign-tag/version.rb +1 -1
- data/lib/octopress-assign-tag.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f3783681ae9f1cbdf7573a68394aca33e63cc3a
|
4
|
+
data.tar.gz: 73e7e918cd921e60001b8ebd68c43c2fbca087ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad0bebc6825e4e19bbf1ae08ca7b40bd1380f753f65695c7dd862ed852378a88bd60a2debfd174ab4ba48a52f6d8a90afeee3eb248fdd0c0396e2dfe2065b6c
|
7
|
+
data.tar.gz: 176096298ab346e07a3e47ab406e6315fb1517019708fda7a517dc800060f26ad607d40852dfae4835ff17b7f0e052a893609f7704c8101d5c40f5e73d9588d2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,41 +12,49 @@ A more powerful assign liquid tag. Features:
|
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
15
|
-
|
15
|
+
If you're using bundler add this gem to your site's Gemfile in the `:jekyll_plugins` group:
|
16
16
|
|
17
|
-
|
17
|
+
group :jekyll_plugins do
|
18
|
+
gem 'octopress-assign-tag'
|
19
|
+
end
|
18
20
|
|
19
|
-
|
21
|
+
Then install the gem with Bundler
|
20
22
|
|
21
23
|
$ bundle
|
22
24
|
|
23
|
-
|
25
|
+
To install manually without bundler:
|
24
26
|
|
25
27
|
$ gem install octopress-assign-tag
|
26
28
|
|
27
|
-
|
29
|
+
Then add the gem to your Jekyll configuration.
|
28
30
|
|
29
31
|
gems:
|
30
|
-
-
|
32
|
+
-octopress-assign-tag
|
31
33
|
|
32
34
|
## Usage
|
33
35
|
|
34
36
|
Use the assign tag like normal.
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
+
```
|
39
|
+
{% assign var1 = 'awesome' %} //=> 'awesome'
|
40
|
+
{% assign var2 = var1 | upcase %} //=> 'AWESOME'
|
41
|
+
```
|
38
42
|
|
39
43
|
Conditionally assign variables.
|
40
44
|
|
41
|
-
|
42
|
-
|
43
|
-
|
45
|
+
```
|
46
|
+
{% assign linkpost = true if post.external-url %}
|
47
|
+
{% assign comments = true unless post.comments == false %}
|
48
|
+
{% assign url (post ? post.url : page.url) %}
|
49
|
+
```
|
44
50
|
|
45
51
|
Use fancy operators in assignment.
|
46
52
|
|
47
|
-
|
48
|
-
|
49
|
-
|
53
|
+
```
|
54
|
+
{% assign author = post.author || page.author || site.author %}
|
55
|
+
{% assign name ||= site.name %}
|
56
|
+
{% assign title_text += ' →' if linkpost %}
|
57
|
+
```
|
50
58
|
|
51
59
|
## Contributing
|
52
60
|
|
data/lib/octopress-assign-tag.rb
CHANGED
@@ -41,7 +41,7 @@ if defined? Octopress::Docs
|
|
41
41
|
Octopress::Docs.add({
|
42
42
|
name: "Octopress Assign Tag",
|
43
43
|
gem: "octopress-assign-tag",
|
44
|
-
version: Octopress::Tags::
|
44
|
+
version: Octopress::Tags::Assign::VERSION,
|
45
45
|
description: "An improved assign liquid tag, featuring conditionals, concatenation, ternary asignment, and more.",
|
46
46
|
path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
|
47
47
|
source_url: "https://github.com/octopress/assign-tag"
|