j1-template 2021.1.13 → 2021.1.14

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.
@@ -144,6 +144,8 @@ defaults:
144
144
 
145
145
  enabled: false
146
146
 
147
+ personalization: true # if set to true, API is categorized as personalized
148
+ reloadPageOnChange: false # reload current page, if the theme has been changed
147
149
  retries: 30 # retry to load theme list from API
148
150
  saveToCookie: true
149
151
  debug: false
@@ -412,7 +412,7 @@ end::tables[]
412
412
  // -----------------------------------------------------------------------------
413
413
  tag::products[]
414
414
  :j1--license: MIT License
415
- :j1--version: 2021.1.13
415
+ :j1--version: 2021.1.14
416
416
  :j1--site-name: Jekyll One
417
417
  end::products[]
418
418
 
@@ -360,6 +360,6 @@ end
360
360
 
361
361
  module Jekyll
362
362
  module J1LunrSearch
363
- VERSION = '2021.1.13'
363
+ VERSION = '2021.1.14'
364
364
  end
365
365
  end
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "j1_starter",
4
- "version": "2021.1.13",
4
+ "version": "2021.1.14",
5
5
  "description": "J1 Template Starter Web",
6
6
  "homepage": "https://your.site",
7
7
  "author": {
@@ -0,0 +1,473 @@
1
+ ---
2
+ title: Quickstart
3
+ tagline: an amazing site in 15 minutes
4
+ date: 2021-03-07 00:00:00
5
+ description: >
6
+ Welcome to the pages of J1 Template. If your here
7
+ first time, a good decision you get on that page first.
8
+ For sure, there is no better place to go.
9
+
10
+ categories: [ Knowledge ]
11
+ tags: [ Quickstart ]
12
+
13
+ comments: true
14
+ fam_menu_id: page_ctrl_simple
15
+
16
+ permalink: /pages/public/learn/quickstart/
17
+ regenerate: false
18
+
19
+ resources: [ clipboard, rouge ]
20
+ resource_options:
21
+ - attic:
22
+ padding_top: 400
23
+ padding_bottom: 50
24
+ opacity: 0.5
25
+ slides:
26
+ - url: /assets/images/modules/attics/matthew-dockery-1920x1280.jpg
27
+ alt: Photo by Matthew Dockery on Unsplash
28
+ badge:
29
+ type: unsplash
30
+ author: Matthew Dockery
31
+ href: https://unsplash.com/@matt_dockery
32
+ ---
33
+
34
+ // Page Initializer
35
+ // =============================================================================
36
+ // Enable the Liquid Preprocessor
37
+ :page-liquid:
38
+
39
+ // Set (local) page attributes here
40
+ // -----------------------------------------------------------------------------
41
+ // :page--attr: <attr-value>
42
+
43
+ // Load Liquid procedures
44
+ // -----------------------------------------------------------------------------
45
+ {% capture load_attributes %}themes/{{site.template.name}}/procedures/global/attributes_loader.proc{%endcapture%}
46
+
47
+ // Load page attributes
48
+ // -----------------------------------------------------------------------------
49
+ {% include {{load_attributes}} scope="global" %}
50
+
51
+
52
+ // Page content
53
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
+
55
+ // Include sub-documents
56
+ // -----------------------------------------------------------------------------
57
+
58
+ *All you need for your new amazing site.*
59
+
60
+ Jekyll meets Bootstrap - and makes a lot of friends. J1 Template combines
61
+ the best of OpenSource software for the Web and the Web site generator
62
+ `Jekyll`. J1 is OpenSource, and so are the packaged modules. No pain for
63
+ private or professional use. Check J1 Template today to learn what's possible
64
+ if you go to the Jekyll Way.
65
+
66
+ *Create powerful modern Static Webs: Secure, Flexible and Fast.*
67
+
68
+ The template comes with a Web included, a skeleton for new website created
69
+ with J1 Template. This Web is called the *Starter Web*, a general-purpose
70
+ Website scaffold to be modified for your needs. The built-in Starter Web
71
+ can be visited live at https://publish.jekyll.one/[J1 Publish, {browser-window--new}].
72
+ This site show live pages deployed on the Internet on _Github_, _Netlify_
73
+ and _Heroku_.
74
+
75
+ *Have fun exploring what a modern static web, a Jekyll site can do*!
76
+
77
+ == The Software needed
78
+
79
+ J1 is supported on all current x64-based OS:
80
+
81
+ * Windows 10, build >= 1903
82
+ * Windows WSL 2
83
+ * Linux, kernel version >= 4.15 (e.g. Ubuntu 18.x LTS)
84
+ * OSX, version >= 10.10.5 (Yosemite)
85
+
86
+ WARNING: Note that 32-bit versions (x32) are generally NOT supported for all
87
+ platforms.
88
+
89
+ === Development languages and tools
90
+
91
+ To run the Development System for J1 Template, the following languages and
92
+ tools expected to be in place with your OS:
93
+
94
+ * Ruby language, version >= 2.6
95
+ * Javascript language (NodeJS), version >= 12.x
96
+
97
+ NOTE: More current or older versions may work, but not tested.
98
+
99
+ === Software upgrades needed for all platforms
100
+
101
+ If _Ruby_ and _NodeJS_ are in place, some packages are to be upgraded to
102
+ more *current* versions. Install all packages system-wide with their
103
+ respective product installation pathes.
104
+
105
+ ==== Upgrades needed for Ruby < v2.7
106
+
107
+ Install latest bundler for Ruby:
108
+
109
+ [source, sh]
110
+ ----
111
+ gem install bundler --no-document
112
+ ----
113
+
114
+ Install latest RubyGems for Ruby:
115
+
116
+ [source, sh]
117
+ ----
118
+ gem install rubygems-update --no-document
119
+ update_rubygems --no-document
120
+ gem update --system
121
+ ----
122
+
123
+ ==== Upgrades needed for NodeJS
124
+
125
+ NodeJS comes with NPM pre-installed. The native CLI for the NodeJS package
126
+ management is `npm`. Besides `npm` there's another quite handy CLI for NPM
127
+ available: *Yarn*.
128
+
129
+ The CLI `yarn` is developed at Facebook and can be used as a replacement
130
+ for `npm`. From a top-level perspective, both package management clients behave
131
+ pretty much the same. The syntax `yarn` uses is shorter in writing, making
132
+ the command-line look a bit more natural. Therefore, we prefer to use `yarn`.
133
+
134
+ NOTE: Yarn adds some additional features to the NodeJS package management
135
+ implemented for the needs at Facebook. Regarding the J1 development system,
136
+ those add-ons are neither needed nor used.
137
+
138
+ Install latest NPM and Yarn packages for NodeJS:
139
+
140
+ [source, sh]
141
+ ----
142
+ npm install -g npm@latest
143
+ npm install -g yarn@latest
144
+ ----
145
+
146
+ == Create a Starter Web
147
+
148
+ Running the J1 template project is very simple:
149
+
150
+ * Download the J1 Gem
151
+ * Create a J1 web project
152
+ * Setup the runtime environment for your project
153
+ * Run and develop the buildin starter web
154
+
155
+ Find all details on this with the sections below.
156
+
157
+ === Download the J1 Gem
158
+
159
+ The Gem for J1 Template (runtime system) is published on _RubyGems_.
160
+ You can get it by installing the package using the Ruby `gem` command or
161
+ by downloading it from link:{url-j1--download}[RubyGems, {browser-window--new}].
162
+
163
+ .Userized installation
164
+ [source, sh]
165
+ ----
166
+ gem install j1-template --remote --user-install --no-document
167
+ ----
168
+
169
+ .System-wide installation
170
+ [source, sh]
171
+ ----
172
+ gem install j1-template --remote --no-document
173
+ ----
174
+
175
+ NOTE: To *not* pollute the system-wide Gem folder of a Ruby-installation by
176
+ *user* and *project* specific Gems, it is recommend to install *J1* userized.
177
+
178
+ J1 is a so-called *gem-based* template, a *Ruby Gem* managed by the (gem)
179
+ internal executeable (command) *j1*. Check your version installed or some
180
+ usage information by running:
181
+
182
+ .Version information
183
+ [source, sh]
184
+ ----
185
+ j1 --version
186
+ ----
187
+
188
+ .Usage information
189
+ [source, sh]
190
+ ----
191
+ j1 --help
192
+ ----
193
+
194
+ === Setup a project
195
+
196
+ Is the Ruby Gem *J1* installed, a project, a website needs to be generated
197
+ by J1's build-in executable *j1*. The command *j1* is used to manage *base*
198
+ project tasks like generating a *project*.
199
+
200
+ If a *project* (a website) is generated, all development tasks are managed
201
+ by *NPM scripts* (NodeJS). Development *tasks* are defined as *scripts*
202
+ with the project config file `package.json`.
203
+
204
+ First, create a projects folder for all website to be generated J1. For the
205
+ following examples, a project is generated on _Windows_ using *C:\Temp*
206
+ for the project's folder.
207
+
208
+ .Usage information
209
+ [source, sh]
210
+ ----
211
+ j1 generate starter
212
+ ----
213
+
214
+ .Output
215
+ ----
216
+ Running bundle install in c:/Temp/starter ...
217
+ Install bundle in USER gem folder ~/.gem ...
218
+
219
+ Bundler: Fetching gem metadata from https://rubygems.org/ ...
220
+ Bundler: Fetching gem metadata from https://rubygems.org/.
221
+ Bundler: Resolving dependencies...
222
+ Bundler: Using rake 12.3.3
223
+ Bundler: Using public_suffix 4.0.6
224
+ ...
225
+ Bundler: Using wdm 0.1.1
226
+ Bundler: Bundle complete! 34 Gemfile dependencies, 86 gems now installed.
227
+ Bundler: Bundled gems are installed into `../../Users/jadams/.gem`
228
+
229
+ Install patches in USER gem folder ~/.gem ...
230
+ Install patches on path C:/Users/jadams/.gem/ruby/2.6.0 ...
231
+ Generated Jekyll site force installed in folder c:/Temp/starter
232
+ ----
233
+
234
+ === Setup the runtime
235
+
236
+ The command *j1 generate* creates a project folder with the name given. In
237
+ this example, the project is *starter*. Change to this folder
238
+
239
+ [source, sh]
240
+ ----
241
+ cd C:\Temp\starter
242
+ ----
243
+
244
+ A J1 project consists in several files and folders. Find a typical structure
245
+ as below:
246
+
247
+ .J1 Project structure
248
+ ----
249
+ ├──── .
250
+ │ └─ _data <1>
251
+ │ └─ _includes <2>
252
+ │ └─ _plugins <3>
253
+ │ └─ assets <4>
254
+ │ └─ collections <5>
255
+ │ └─ pages <6>
256
+ │ └─ utilsrv
257
+ ├──── _config.yml <7>
258
+ ├──── config.ru
259
+ ├──── dot.gitattributes
260
+ ├──── dot.gitignore
261
+ ├──── dot.nojekyll
262
+ ├──── favicon.ico
263
+ ├──── Gemfile <8>
264
+ ├──── index.html <9>
265
+ └──── package.json <10>
266
+ ----
267
+ <1> Configuration data for the website
268
+ <2> Asciidoc (global) includes
269
+ <3> Build-in (Ruby) plugins
270
+ <4> Assets for the web
271
+ <5> Folder that contains all blog posts
272
+ <6> Folder that contains all (article) pages
273
+ <7> Central (Jekyll) site configuration
274
+ <8> Ruby Gemfile
275
+ <9> Homepage for the web
276
+ <10> (NPM) Project file
277
+
278
+ The first step, done only once, is to initialize a project. What means to
279
+ download and install all resources for your new website followed by an
280
+ initial creation process for the new site. Initializing a project is managed
281
+ by the (NPM) *task* `setup`. A bunch of sub-tasks get fired, all of them
282
+ managed by NPM.
283
+
284
+ Let's start ...
285
+
286
+ [source, sh]
287
+ ----
288
+ yarn setup
289
+ ----
290
+
291
+ Because a lot of sub-tasks getting started for a (first) `setup`, see below
292
+ the output as a summary:
293
+
294
+ ----
295
+ Setup project for first use ..
296
+ Bootstrap base modules ..
297
+ done.
298
+ Configure environment ..
299
+ done.
300
+ Create project folders ..
301
+ Create log folder ..
302
+ Create archived log folder ..
303
+ Create etc folder ..
304
+ done.
305
+ Bootstrap project modules ..
306
+ Bootstrap utility server modules ..
307
+ done.
308
+ Detect OS ..
309
+ OS detected: Windows_NT
310
+ Build site incremental ..
311
+ Configuration file: c:/Temp/starter/_config.yml
312
+ Source: c:/Temp/starter
313
+ Destination: c:/Temp/starter/_site
314
+ Incremental build: enabled
315
+ Generating...
316
+ J1 QuickSearch: creating search index ...
317
+ J1 QuickSearch: finished, index ready.
318
+ J1 Paginator: autopages, disabled|not configured
319
+ J1 Paginator: pagination enabled, start processing ...
320
+ J1 Paginator: finished, processed 5 pagination page|s
321
+ done in 25.687 seconds.
322
+ Auto-regeneration: disabled. Use --watch to enable.
323
+ .. build finished.
324
+ To open the site, run: yarn site
325
+
326
+ Done in 88.03s.
327
+ ----
328
+
329
+ The `setup` process will take a while - typically some minutes for the
330
+ *first* run (depending on the performances of your Internet connection
331
+ and your workstation). A bunch of NPM modules and Ruby Gems are downloaded
332
+ and linked for the components part of the project. See `setup` as an extended
333
+ *install* and *build* process to manage an initial setup for your new
334
+ website.
335
+
336
+ === Run and develop a starter web
337
+
338
+ Running the Starter Web for development is done like so:
339
+
340
+ [source, sh]
341
+ ----
342
+ yarn site
343
+ ----
344
+
345
+ The task `site` does a lot for you; whatever is necessary for a full-stack
346
+ Web development. The task will put in place all needed CSS and JS components,
347
+ build the Web content.
348
+
349
+ ----
350
+ Startup the site ..
351
+ Configuration file: c:/Temp/starter/_config.yml
352
+ Source: c:/Temp/starter
353
+ Destination: c:/Temp/starter/_site
354
+ Incremental build: enabled
355
+ Generating...
356
+ J1 QuickSearch: creating search index ...
357
+ J1 QuickSearch: finished, index ready.
358
+ J1 Paginator: autopages, disabled|not configured
359
+ J1 Paginator: pagination enabled, start processing ...
360
+ J1 Paginator: finished, processed 5 pagination page|s
361
+ done in 7.1 seconds.
362
+ Auto-regeneration: enabled for '.'
363
+ LiveReload address: http://localhost:40001
364
+ Server address: http://localhost:40000/
365
+ Server running... press ctrl-c to stop.
366
+ LiveReload: Browser connected
367
+ ----
368
+
369
+ Finally, the starter web get openend in your *default* browser.
370
+
371
+ Go, go, go ..
372
+
373
+ === Rebuild a site
374
+
375
+ A project runs Jekyll in *incremental* mode with *auto-regeneration* enabled.
376
+ All changes made to the pages (posts) of your web at runtime are automatically
377
+ detected and the affected are rebuild and (live) reloaded.
378
+
379
+ To rebuild the *site* from the scratch, a web can be completely rebuild by
380
+ running the task `rebuild`:
381
+
382
+ [source, sh]
383
+ ----
384
+ yarn rebuild
385
+ ----
386
+
387
+ ----
388
+ Rebuild site incremental ..
389
+ Clean up site files ..
390
+ Configuration file: c:/Temp/starter/_config.yml
391
+ Cleaner: Removing _site...
392
+ Cleaner: Removing ./.jekyll-metadata...
393
+ Cleaner: Removing ./.jekyll-cache...
394
+ Cleaner: Nothing to do for .sass-cache.
395
+ Configuration file: c:/Temp/starter/_config.yml
396
+ Source: c:/Temp/starter
397
+ Destination: c:/Temp/starter/_site
398
+ Incremental build: enabled
399
+ Generating...
400
+ J1 QuickSearch: creating search index ...
401
+ J1 QuickSearch: finished, index ready.
402
+ J1 Paginator: autopages, disabled|not configured
403
+ J1 Paginator: pagination enabled, start processing ...
404
+ J1 Paginator: finished, processed 5 pagination page|s
405
+ done in 25.221 seconds.
406
+ Auto-regeneration: disabled. Use --watch to enable.
407
+ .. rebuild finished.
408
+ To open the site, run: yarn site.
409
+ Done in 34.88s.
410
+ ----
411
+
412
+ If the site rebuild, re-run:
413
+
414
+ [source, sh]
415
+ ----
416
+ yarn site
417
+ ----
418
+
419
+ and continue developing your website.
420
+
421
+ === Reset a project
422
+
423
+ To start from the beginning, you can reset the runtime system to the
424
+ factory state. The top-level task `reset` does the resetting work for you
425
+ and cleans up each and everything except the NPM modules folder `node_modules`
426
+ stored in the project root.
427
+
428
+ [source, sh]
429
+ ----
430
+ yarn reset
431
+ ----
432
+
433
+ The cleanup runs some tasks for the root folder and in parallel sub-tasks
434
+ using Jekyll for the Web:
435
+
436
+ ----
437
+ Reset project to factory state ..
438
+ Clean up base modules ..
439
+ Clean up site files ..
440
+ Configuration file: c:/Temp/starter/_config.yml
441
+ Cleaner: Removing _site...
442
+ Cleaner: Removing ./.jekyll-metadata...
443
+ Cleaner: Removing ./.jekyll-cache...
444
+ Cleaner: Nothing to do for .sass-cache.
445
+ Clean up projects files ..
446
+ Remove bundle config folder ..
447
+ Remove log folder ..
448
+ Remove etc folder ..
449
+ Remove various log files ..
450
+ Remove lock files ..
451
+ Clean up utility server ..
452
+ done.
453
+ Done in 10.23s.
454
+ ----
455
+
456
+ To reset the project *completely*, delete the folder `node_modules` manually
457
+ and start from the beginning by running the `setup` task again:
458
+
459
+ [source, sh]
460
+ ----
461
+ yarn setup
462
+ ----
463
+
464
+ If the project is newly setup, re-run:
465
+
466
+ [source, sh]
467
+ ----
468
+ yarn site
469
+ ----
470
+
471
+ and continue developing your website.
472
+
473
+ Happy Jekylling!