jekyll-umlauts 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/jekyll-umlauts.rb +37 -0
- metadata +43 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7d87dbfe925df8346fd90f41f255536508a06f82
|
4
|
+
data.tar.gz: b13b0260ef79a35e2f1c7d4ba620a4bdb74b25a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72143d9dcde1cb040ed7dc07dfc2e8ebda348b2a7b3af89469a77c5150a8ee9f0bcee00210b6f42c648f17efbcc5cf31fe05b9f0319915b5b87719849ebab30b
|
7
|
+
data.tar.gz: ac135d2a4657661cd01ae3f4b7a66e6efa15fba4c1c81c15bec1a692349b7893b9b6b4d9c6c3aa979b3af553d2e24b101fd5ce7d41afbd0ba3350bac5b2fc54d
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This generator converts all umlauts äÄöÖüÜ and ß in its correct html equivalent
|
2
|
+
# ü = ü Ü = Ü
|
3
|
+
# ä = ä Ä = Ä
|
4
|
+
# ö = ö Ö = Ö
|
5
|
+
# ß = ß
|
6
|
+
# Author: Arne Gockeln
|
7
|
+
# Website: http://www.arnegockeln.com
|
8
|
+
module Jekyll
|
9
|
+
class UmlautsGenerator < Generator
|
10
|
+
safe true
|
11
|
+
priority :highest
|
12
|
+
|
13
|
+
def generate(site)
|
14
|
+
puts "\nReplace umlauts"
|
15
|
+
|
16
|
+
site.pages.each do |page|
|
17
|
+
page.content = replace(page.content)
|
18
|
+
end
|
19
|
+
|
20
|
+
site.posts.each do |post|
|
21
|
+
post.content = replace(post.content)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def replace(content)
|
26
|
+
content.gsub!(/ü/, 'ü')
|
27
|
+
content.gsub!(/Ü/, 'Ü')
|
28
|
+
content.gsub!(/ö/, 'ö')
|
29
|
+
content.gsub!(/Ö/, 'Ö')
|
30
|
+
content.gsub!(/ä/, 'ä')
|
31
|
+
content.gsub!(/Ä/, 'Ä')
|
32
|
+
content.gsub!(/ß/, 'ß')
|
33
|
+
|
34
|
+
content
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-umlauts
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Arne Gockeln
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: When the jekyll site is generated all umlauts will be converted to html.
|
14
|
+
email: hallo@webchef.de
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/jekyll-umlauts.rb
|
20
|
+
homepage: http://rubygems.org/gems/jekyll-umlauts
|
21
|
+
licenses: []
|
22
|
+
metadata: {}
|
23
|
+
post_install_message:
|
24
|
+
rdoc_options: []
|
25
|
+
require_paths:
|
26
|
+
- lib
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '0'
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
requirements: []
|
38
|
+
rubyforge_project:
|
39
|
+
rubygems_version: 2.4.8
|
40
|
+
signing_key:
|
41
|
+
specification_version: 4
|
42
|
+
summary: Umlauts Generator
|
43
|
+
test_files: []
|