j1-template 2022.0.2 → 2022.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +3 -13
- data/_includes/themes/j1/modules/connectors/comment/hyvor.html +4 -5
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +4 -4
- data/assets/data/private.json +1 -5
- data/assets/themes/j1/adapter/js/cookieConsent.js +12 -9
- data/assets/themes/j1/adapter/js/j1.js +17 -17
- data/assets/themes/j1/adapter/js/translator.js +4 -2
- data/assets/themes/j1/core/js/template.js +59 -0
- data/assets/themes/j1/core/js/template.min.js +5 -5
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/cryptoJS/js/aes.js +35 -0
- data/assets/themes/j1/modules/cryptoJS/js/aes.min.js +35 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-md5.js +21 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-ripemd160.js +31 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha1.js +17 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha224.js +19 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha256.js +18 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha3.js +21 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha384.js +27 -0
- data/assets/themes/j1/modules/cryptoJS/js/hmac-sha512.js +25 -0
- data/assets/themes/j1/modules/cryptoJS/js/md5.js +19 -0
- data/assets/themes/j1/modules/cryptoJS/js/pbkdf2.js +19 -0
- data/assets/themes/j1/modules/cryptoJS/js/rabbit-legacy.js +36 -0
- data/assets/themes/j1/modules/cryptoJS/js/rabbit.js +36 -0
- data/assets/themes/j1/modules/cryptoJS/js/rc4.js +33 -0
- data/assets/themes/j1/modules/cryptoJS/js/ripemd160.js +29 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha1.js +15 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha224.js +17 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha256.js +16 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha3.js +19 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha384.js +25 -0
- data/assets/themes/j1/modules/cryptoJS/js/sha512.js +23 -0
- data/assets/themes/j1/modules/cryptoJS/js/tripledes.js +51 -0
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js +460 -0
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.js +379 -353
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.min.js +1 -1
- data/assets/themes/j1/modules/gtag-opt-in/js/gtag-opt-in.js +93 -1
- data/assets/themes/j1/modules/scroller/js/scroller.js +6 -6
- data/assets/themes/j1/modules/scroller/js/scroller.min.js +1 -1
- data/exe/j1 +6 -7
- data/lib/j1/commands/generate.rb +15 -16
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +7 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/_defaults/private.yml +3 -2
- data/lib/starter_web/_data/builder/defaults/_blog_navigator.yml +396 -0
- data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +48 -42
- data/lib/starter_web/_data/modules/translator.yml +3 -3
- data/lib/starter_web/_data/private.yml +3 -2
- data/lib/starter_web/_data/resources.yml +27 -2
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/encodeBase64.rb +46 -0
- data/lib/starter_web/_plugins/encryptAES.rb +53 -0
- data/lib/starter_web/_plugins/filters.rb +2 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/_plugins/minifyJSON.rb +2 -2
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +0 -21
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +1 -0
- data/lib/starter_web/pages/public/blog/navigator/archive.html +1 -1
- data/lib/starter_web/pages/public/learn/quickstart.adoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/100_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +30 -5
- data/lib/j1/commands/help.rb +0 -32
- data/lib/j1/commands/module.rb +0 -69
@@ -361,7 +361,11 @@ resources:
|
|
361
361
|
core/css/vendor
|
362
362
|
|
363
363
|
]
|
364
|
-
files: [
|
364
|
+
files: [
|
365
|
+
adapter/js/j1.js,
|
366
|
+
# modules/cryptoJS/js/aes.js,
|
367
|
+
# "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"
|
368
|
+
]
|
365
369
|
js: [
|
366
370
|
modules/gtag-opt-in/js/gtag-opt-in,
|
367
371
|
modules/jquery/js/jquery,
|
@@ -1299,7 +1303,28 @@ resources:
|
|
1299
1303
|
data:
|
1300
1304
|
css: []
|
1301
1305
|
files: []
|
1302
|
-
js: [ modules/deeplAPI/js/deeplAPI ]
|
1306
|
+
js: [ modules/cryptoJS/js/aes, modules/deeplAPI/js/deeplAPI ]
|
1307
|
+
init_function: []
|
1308
|
+
|
1309
|
+
# ----------------------------------------------------------------------------
|
1310
|
+
# cryptoJS, JavaScript implementations of standard and secure cryptographic algorithms
|
1311
|
+
#
|
1312
|
+
- name: cryptoJS
|
1313
|
+
resource:
|
1314
|
+
id: cryptoJS
|
1315
|
+
enabled: true
|
1316
|
+
comment: cryptoJS
|
1317
|
+
region: head
|
1318
|
+
layout: [ all ]
|
1319
|
+
required: ondemand
|
1320
|
+
preload: false
|
1321
|
+
script_load: defer
|
1322
|
+
dependencies: false
|
1323
|
+
pass_init_data: false
|
1324
|
+
data:
|
1325
|
+
css: []
|
1326
|
+
files: []
|
1327
|
+
js: [ modules/cryptoJS/js/aes ]
|
1303
1328
|
init_function: []
|
1304
1329
|
|
1305
1330
|
# ----------------------------------------------------------------------------
|
@@ -432,7 +432,7 @@ end::tables[]
|
|
432
432
|
// -----------------------------------------------------------------------------
|
433
433
|
tag::products[]
|
434
434
|
:j1--license: MIT License
|
435
|
-
:j1--version: 2022.0.
|
435
|
+
:j1--version: 2022.0.3
|
436
436
|
:j1--site-name: Jekyll One
|
437
437
|
end::products[]
|
438
438
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# ------------------------------------------------------------------------------
|
2
|
+
# ~/_plugins/encodeBase64.rb
|
3
|
+
# Liquid filter for J1 Template to Base64 encode
|
4
|
+
#
|
5
|
+
# Product/Info:
|
6
|
+
# http://jekyll.one
|
7
|
+
#
|
8
|
+
# Copyright (C) 2021 Juergen Adams
|
9
|
+
#
|
10
|
+
# J1 Template is licensed under the MIT License.
|
11
|
+
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
+
# ------------------------------------------------------------------------------
|
13
|
+
# NOTE:
|
14
|
+
# CustomFilters cannot be used in SAFE mode (e.g not usable for
|
15
|
+
# rendering pages with Jekyll on GitHub
|
16
|
+
#
|
17
|
+
# USAGE:
|
18
|
+
# {% capture cache_name %}
|
19
|
+
#
|
20
|
+
# liquid code to generate HTML output goes here
|
21
|
+
#
|
22
|
+
# {% endcapture %}
|
23
|
+
# {{ cache_name | encode64 }}
|
24
|
+
#
|
25
|
+
# ------------------------------------------------------------------------------
|
26
|
+
# noinspection SpellCheckingInspection
|
27
|
+
# rubocop:disable Lint/UnneededDisable
|
28
|
+
# rubocop:disable Style/Documentation
|
29
|
+
# rubocop:disable Metrics/LineLength
|
30
|
+
# rubocop:disable Layout/TrailingWhitespace
|
31
|
+
# rubocop:disable Layout/SpaceAroundOperators
|
32
|
+
# rubocop:disable Layout/ExtraSpacing
|
33
|
+
# rubocop:disable Metrics/AbcSize
|
34
|
+
# ------------------------------------------------------------------------------
|
35
|
+
require 'base64'
|
36
|
+
|
37
|
+
module Jekyll
|
38
|
+
module EncodeBase64
|
39
|
+
def encodeBase64(input)
|
40
|
+
encoded = Base64.encode64(input)
|
41
|
+
input = encoded
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
Liquid::Template.register_filter(Jekyll::EncodeBase64)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# ------------------------------------------------------------------------------
|
2
|
+
# ~/_plugins/encode64JSON.rb
|
3
|
+
# Liquid filter for J1 Template to Base64 encode a JSON string
|
4
|
+
#
|
5
|
+
# Product/Info:
|
6
|
+
# http://jekyll.one
|
7
|
+
#
|
8
|
+
# Copyright (C) 2021 Juergen Adams
|
9
|
+
#
|
10
|
+
# J1 Template is licensed under the MIT License.
|
11
|
+
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
+
# ------------------------------------------------------------------------------
|
13
|
+
# NOTE:
|
14
|
+
# CustomFilters cannot be used in SAFE mode (e.g not usable for
|
15
|
+
# rendering pages with Jekyll on GitHub
|
16
|
+
#
|
17
|
+
# USAGE:
|
18
|
+
# {% capture cache_name %}
|
19
|
+
#
|
20
|
+
# liquid code to generate HTML output goes here
|
21
|
+
#
|
22
|
+
# {% endcapture %}
|
23
|
+
# {{ cache_name | uglify }}
|
24
|
+
# ------------------------------------------------------------------------------
|
25
|
+
# noinspection SpellCheckingInspection
|
26
|
+
# rubocop:disable Lint/UnneededDisable
|
27
|
+
# rubocop:disable Style/Documentation
|
28
|
+
# rubocop:disable Metrics/LineLength
|
29
|
+
# rubocop:disable Layout/TrailingWhitespace
|
30
|
+
# rubocop:disable Layout/SpaceAroundOperators
|
31
|
+
# rubocop:disable Layout/ExtraSpacing
|
32
|
+
# rubocop:disable Metrics/AbcSize
|
33
|
+
# ------------------------------------------------------------------------------
|
34
|
+
require 'openssl'
|
35
|
+
require 'base64'
|
36
|
+
|
37
|
+
module Jekyll
|
38
|
+
module EncryptAES
|
39
|
+
def encryptAES(input)
|
40
|
+
aes = OpenSSL::Cipher::Cipher.new('aes-128-cbc')
|
41
|
+
aes.encrypt
|
42
|
+
|
43
|
+
aes.key = '8c841fc2e3aa2bd5'
|
44
|
+
aes.iv = '0000000000000000'
|
45
|
+
|
46
|
+
encrypted = aes.update(input) + aes.final
|
47
|
+
encoded = Base64.encode64(encrypted)
|
48
|
+
input = encoded
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
Liquid::Template.register_filter(Jekyll::EncryptAES)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------
|
2
|
-
# ~/_plugins/
|
3
|
-
# Liquid filter for J1 Template to
|
2
|
+
# ~/_plugins/minifyJSON.rb
|
3
|
+
# Liquid filter for J1 Template to minify a JSON string
|
4
4
|
#
|
5
5
|
# Product/Info:
|
6
6
|
# http://jekyll.one
|
@@ -247,24 +247,3 @@ site_category_word_list: {{site_category_word_list | debug}}
|
|
247
247
|
{% endfor %}
|
248
248
|
{% endfor %}
|
249
249
|
</div>
|
250
|
-
|
251
|
-
++++
|
252
|
-
<script>
|
253
|
-
$(function () {
|
254
|
-
var logger = log4javascript.getLogger('j1.blog.scroller');
|
255
|
-
var scrollOffset = j1.getScrollOffset();
|
256
|
-
var scrollDuration = 300;
|
257
|
-
var anchor_id;
|
258
|
-
|
259
|
-
$('.badge-tag').on('click', function (e) {
|
260
|
-
e.preventDefault();
|
261
|
-
anchor_id = e.target.hash;
|
262
|
-
logger.debug('\n' + 'badge clicked: ' + anchor_id);
|
263
|
-
|
264
|
-
$('html, body').animate({
|
265
|
-
scrollTop: $(anchor_id).offset().top + scrollOffset
|
266
|
-
}, scrollDuration);
|
267
|
-
});
|
268
|
-
}); //END page ready
|
269
|
-
</script>
|
270
|
-
++++
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.0.
|
4
|
+
version: 2022.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juergen_jekyll_one
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -1049,6 +1049,29 @@ files:
|
|
1049
1049
|
- assets/themes/j1/modules/cookieConsent/LICENSE
|
1050
1050
|
- assets/themes/j1/modules/cookieConsent/js/cookieConsent.js
|
1051
1051
|
- assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js
|
1052
|
+
- assets/themes/j1/modules/cryptoJS/js/aes.js
|
1053
|
+
- assets/themes/j1/modules/cryptoJS/js/aes.min.js
|
1054
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-md5.js
|
1055
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-ripemd160.js
|
1056
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha1.js
|
1057
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha224.js
|
1058
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha256.js
|
1059
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha3.js
|
1060
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha384.js
|
1061
|
+
- assets/themes/j1/modules/cryptoJS/js/hmac-sha512.js
|
1062
|
+
- assets/themes/j1/modules/cryptoJS/js/md5.js
|
1063
|
+
- assets/themes/j1/modules/cryptoJS/js/pbkdf2.js
|
1064
|
+
- assets/themes/j1/modules/cryptoJS/js/rabbit-legacy.js
|
1065
|
+
- assets/themes/j1/modules/cryptoJS/js/rabbit.js
|
1066
|
+
- assets/themes/j1/modules/cryptoJS/js/rc4.js
|
1067
|
+
- assets/themes/j1/modules/cryptoJS/js/ripemd160.js
|
1068
|
+
- assets/themes/j1/modules/cryptoJS/js/sha1.js
|
1069
|
+
- assets/themes/j1/modules/cryptoJS/js/sha224.js
|
1070
|
+
- assets/themes/j1/modules/cryptoJS/js/sha256.js
|
1071
|
+
- assets/themes/j1/modules/cryptoJS/js/sha3.js
|
1072
|
+
- assets/themes/j1/modules/cryptoJS/js/sha384.js
|
1073
|
+
- assets/themes/j1/modules/cryptoJS/js/sha512.js
|
1074
|
+
- assets/themes/j1/modules/cryptoJS/js/tripledes.js
|
1052
1075
|
- assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_asc.png
|
1053
1076
|
- assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_asc_disabled.png
|
1054
1077
|
- assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_both.png
|
@@ -1059,6 +1082,7 @@ files:
|
|
1059
1082
|
- assets/themes/j1/modules/datatables/css/theme/uno.css
|
1060
1083
|
- assets/themes/j1/modules/datatables/js/datatables.js
|
1061
1084
|
- assets/themes/j1/modules/datatables/js/datatables.min.js
|
1085
|
+
- assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js
|
1062
1086
|
- assets/themes/j1/modules/deeplAPI/js/deeplAPI.js
|
1063
1087
|
- assets/themes/j1/modules/deeplAPI/js/deeplAPI.min.js
|
1064
1088
|
- assets/themes/j1/modules/fab/css/theme/uno/fab.css
|
@@ -1448,8 +1472,6 @@ files:
|
|
1448
1472
|
- lib/j1.rb
|
1449
1473
|
- lib/j1/command.rb
|
1450
1474
|
- lib/j1/commands/generate.rb
|
1451
|
-
- lib/j1/commands/help.rb
|
1452
|
-
- lib/j1/commands/module.rb
|
1453
1475
|
- lib/j1/external.rb
|
1454
1476
|
- lib/j1/log_adapter.rb
|
1455
1477
|
- lib/j1/log_helper.rb
|
@@ -1549,6 +1571,7 @@ files:
|
|
1549
1571
|
- lib/starter_web/_data/blocks/footer.yml
|
1550
1572
|
- lib/starter_web/_data/blocks/panel.yml
|
1551
1573
|
- lib/starter_web/_data/builder/blog_navigator.yml
|
1574
|
+
- lib/starter_web/_data/builder/defaults/_blog_navigator.yml
|
1552
1575
|
- lib/starter_web/_data/builder/defaults/blog_navigator.yml
|
1553
1576
|
- lib/starter_web/_data/categories.yml
|
1554
1577
|
- lib/starter_web/_data/colors.yml
|
@@ -1649,6 +1672,8 @@ files:
|
|
1649
1672
|
- lib/starter_web/_plugins/asciidoctor-extensions/twitter-emoji-inline.rb
|
1650
1673
|
- lib/starter_web/_plugins/date-i18n.rb
|
1651
1674
|
- lib/starter_web/_plugins/debug.rb
|
1675
|
+
- lib/starter_web/_plugins/encodeBase64.rb
|
1676
|
+
- lib/starter_web/_plugins/encryptAES.rb
|
1652
1677
|
- lib/starter_web/_plugins/filters.rb
|
1653
1678
|
- lib/starter_web/_plugins/lorem_inline.rb
|
1654
1679
|
- lib/starter_web/_plugins/lunr_index.rb
|
@@ -2055,7 +2080,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2055
2080
|
- !ruby/object:Gem::Version
|
2056
2081
|
version: '0'
|
2057
2082
|
requirements: []
|
2058
|
-
rubygems_version: 3.2.
|
2083
|
+
rubygems_version: 3.2.32
|
2059
2084
|
signing_key:
|
2060
2085
|
specification_version: 4
|
2061
2086
|
summary: J1 Template
|
data/lib/j1/commands/help.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
module J1
|
2
|
-
module Commands
|
3
|
-
class Help < Command
|
4
|
-
class << self
|
5
|
-
def init_with_program(prog)
|
6
|
-
prog.command(:help) do |c|
|
7
|
-
c.syntax "help [subcommand]"
|
8
|
-
c.description "Show the help message, optionally for a given subcommand."
|
9
|
-
|
10
|
-
c.action do |args, _|
|
11
|
-
cmd = (args.first || "").to_sym
|
12
|
-
if args.empty?
|
13
|
-
puts prog
|
14
|
-
elsif prog.has_command? cmd
|
15
|
-
puts prog.commands[cmd]
|
16
|
-
else
|
17
|
-
invalid_command(prog, cmd)
|
18
|
-
abort
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def invalid_command(prog, cmd)
|
25
|
-
J1.logger.error "Error:",
|
26
|
-
"Sorry, don't know what the '#{cmd}' command is."
|
27
|
-
J1.logger.info "Valid commands:", prog.commands.keys.join(", ")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/lib/j1/commands/module.rb
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
require "erb"
|
2
|
-
|
3
|
-
module J1
|
4
|
-
module Commands
|
5
|
-
class Module < Command
|
6
|
-
class << self
|
7
|
-
def init_with_program(prog)
|
8
|
-
|
9
|
-
prog.command(:new) do |c|
|
10
|
-
c.syntax "module MOD_NAME [option]"
|
11
|
-
c.description "Manages a module MOD_NAME"
|
12
|
-
|
13
|
-
c.option "register", "--register", "Registers a module MOD_NAME"
|
14
|
-
c.option "list", "--list", "List all registered modules"
|
15
|
-
c.option "detail", "--detail", "List details of a registered module MOD_NAME"
|
16
|
-
|
17
|
-
c.action do |args, options|
|
18
|
-
J1::Commands::Modules.process(args, options)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
def process(args, options = {})
|
25
|
-
raise ArgumentError, "You must specify a path." if args.empty?
|
26
|
-
|
27
|
-
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
28
|
-
FileUtils.mkdir_p new_blog_path
|
29
|
-
if preserve_source_location?(new_blog_path, options)
|
30
|
-
J1.logger.abort_with "Conflict:",
|
31
|
-
"#{new_blog_path} exists and is not empty."
|
32
|
-
end
|
33
|
-
|
34
|
-
if options["blank"]
|
35
|
-
create_blank_site new_blog_path
|
36
|
-
else
|
37
|
-
create_site new_blog_path
|
38
|
-
end
|
39
|
-
|
40
|
-
after_install(new_blog_path, options)
|
41
|
-
end
|
42
|
-
|
43
|
-
def create_blank_site(path)
|
44
|
-
Dir.chdir(path) do
|
45
|
-
FileUtils.mkdir(%w(_layouts _posts _drafts))
|
46
|
-
FileUtils.touch("index.html")
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def scaffold_post_content
|
51
|
-
ERB.new(File.read(File.expand_path(scaffold_path, starter_web))).result
|
52
|
-
end
|
53
|
-
|
54
|
-
# Internal: Gets the filename of the sample post to be created
|
55
|
-
#
|
56
|
-
# Returns the filename of the sample post, as a String
|
57
|
-
def initialized_post_name
|
58
|
-
"_posts/#{Time.now.strftime("%Y-%m-%d")}-welcome-to-jekyll.markdown"
|
59
|
-
end
|
60
|
-
|
61
|
-
private
|
62
|
-
|
63
|
-
def register_module(new_blog_path)
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|