sancho 0.6.2 → 0.7.0
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 +4 -4
- data/.dockerignore +12 -0
- data/.rubocop.yml +73 -0
- data/.sancho.yml +7 -0
- data/CHANGELOG.md +11 -7
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +22 -22
- data/Rakefile +0 -5
- data/docs/changelog.html +90 -96
- data/docs/index.html +170 -159
- data/docs/readme.html +170 -159
- data/docs/sitemap.xml +30 -30
- data/docs/story.html +60 -57
- data/exe/sancho +4 -0
- data/lib/_layouts/robots.txt.erb +4 -0
- data/{_layouts → lib/_layouts}/sitemap.xml.erb +4 -4
- data/lib/sancho/cli.rb +57 -0
- data/lib/sancho/config.rb +25 -0
- data/lib/sancho/model/config.rb +8 -0
- data/lib/sancho/model/page.rb +16 -0
- data/lib/sancho/model/site.rb +23 -0
- data/lib/sancho/model.rb +10 -0
- data/lib/sancho/tasks/basic.rb +17 -0
- data/lib/sancho/tasks/build_site.rb +55 -0
- data/lib/{config.ru → sancho/tasks/config.ru} +3 -2
- data/lib/sancho/tasks/copy_assets.rb +19 -0
- data/lib/sancho/tasks/read_config.rb +37 -0
- data/lib/sancho/tasks/serve_site.rb +18 -0
- data/lib/sancho/tasks.rb +11 -0
- data/lib/sancho.rb +4 -33
- data/lib/tasks.rake +17 -5
- data/sancho.gemspec +3 -7
- metadata +31 -20
- data/_layouts/robots.txt.erb +0 -4
- data/lib/sancho/conf.rb +0 -21
- data/lib/sancho/page.rb +0 -11
- data/lib/sancho/site.rb +0 -24
- /data/{_layouts → lib/_layouts}/footer.md +0 -0
- /data/{_layouts → lib/_layouts}/header.md +0 -0
- /data/{_layouts → lib/_layouts}/layout.html +0 -0
- /data/{_layouts → lib/_layouts}/styles.css +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66a1c14bbe20f6b69502ecb9bcbe5a611851ed7fe940f0ac6642c3ccb84631c5
|
4
|
+
data.tar.gz: f18a7dbc4fd6ccc7ff738fc6abb26b48736c6b62cf9395f33b1913d2c01181bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bb1ae1f3e7f1da7dba28d20cd0302411944b119823cfd2fd02b8c7a125053dd7eae8a18a6a1ef856a3d01a5d09c9430f7f45245c8f54b939086e5e5acf6e76d
|
7
|
+
data.tar.gz: 03c0998e45418b6751547fa964b9e8c3effb7adb0f3e78a6237e18da4e9eef095cc012431bdb3de2ee91734fd0a408b1e890d567871c49fb39acbbe2751e95dc
|
data/.dockerignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
11
|
+
AllCops:
|
12
|
+
TargetRubyVersion: 3.4.X
|
13
|
+
DisableByDefault: true
|
14
|
+
Exclude:
|
15
|
+
- 'test/**/*'
|
16
|
+
|
17
|
+
Style:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
# the codebase desing provides bunch of mappers and interactors
|
21
|
+
# that are actually "method"-like thing that have only one method
|
22
|
+
# and it "call"
|
23
|
+
# TODO: inspect on Proc#[] and [] for only-one-method classes
|
24
|
+
Style/LambdaCall:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
# was spoted in Data constructors, where the constructor
|
28
|
+
# use the same arguments order as is was defined
|
29
|
+
Style/KeywordParametersOrder:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
# fail used intentionally to show that partilcular exeptions
|
33
|
+
# are not rescued/handled in the context of the fail call
|
34
|
+
# some obsolete consideration could be fund by link
|
35
|
+
# https://stackoverflow.com/questions/31937632/fail-vs-raise-in-ruby-should-we-really-believe-the-style-guide
|
36
|
+
Style/SignalException:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# it's mainly ?\n that is one symbol shorter than "\n" with no necessity to wrap in ""
|
40
|
+
Style/CharacterLiteral:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
# thats ridiculous cause many standard thing do not follow it
|
44
|
+
# have one simple string now do not mean it will simple string
|
45
|
+
# forever.. maybe for require/require_relative, but not everywhere
|
46
|
+
Style/StringLiterals:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# there are a few modules used like classes; I like it simplicity
|
50
|
+
Style/ModuleFunction:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
# # interfactor do not inlcude entities, not mixed-it-in but just
|
54
|
+
# # use shorter names withot the necessity Dog::Entitiies::Blob
|
55
|
+
# # just Blob
|
56
|
+
# Style/MixinUsage:
|
57
|
+
# Enabled: false
|
58
|
+
|
59
|
+
# not always fit my style mapping some string than adding ?\n
|
60
|
+
# TODO: maybe change some style
|
61
|
+
Style/StringConcatenation:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
# some abstract classes require such arguments
|
65
|
+
# TODO: explore RuboCop further, maybe mark abstract stuff
|
66
|
+
Lint/UnusedMethodArgument:
|
67
|
+
Enbale: false
|
68
|
+
|
69
|
+
Metrics:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Layout:
|
73
|
+
Enabled: false
|
data/.sancho.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -6,21 +6,25 @@ keywords:
|
|
6
6
|
- ruby
|
7
7
|
...
|
8
8
|
|
9
|
-
## [
|
9
|
+
## [Unreleased]
|
10
10
|
|
11
|
-
|
12
|
-
- [ ] page collections with own collection layout and index.html
|
11
|
+
__TODO__
|
13
12
|
|
14
|
-
|
13
|
+
- [ ] add progress copying assets and generated HTML files
|
14
|
+
|
15
|
+
## [0.7.0] - 2025-08-24
|
16
|
+
|
17
|
+
- designed CLI interface of init, build, serve commands
|
18
|
+
- removed Rake interface (that was dependency disaster)
|
19
|
+
- Ruby 3.4
|
15
20
|
|
16
|
-
## [0.6.
|
21
|
+
## [0.6.0] - 2024-03-07
|
17
22
|
|
18
23
|
- designed new model based on Data.define
|
19
24
|
- designed tests for tasks.rake
|
20
|
-
- designed new `sancho:serve` tasks
|
25
|
+
- designed new `sancho:serve` and `sancho:release` tasks
|
21
26
|
- improved `sancho:init` output
|
22
27
|
- improved `sancho:docs` using Dir.mktempdir
|
23
|
-
- removed `docs branch` stuff
|
24
28
|
|
25
29
|
## [0.3.0] - 2023-02-11
|
26
30
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,43 +5,43 @@ keywords:
|
|
5
5
|
- github-pages-generator
|
6
6
|
...
|
7
7
|
|
8
|
-
|
8
|
+
## Overview
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
Run
|
10
|
+
Sancho plays [Github Pages](https://pages.github.com/) generator designed for simplest site generation from a few markdown files.
|
13
11
|
|
14
|
-
|
12
|
+
In my scenario, I always have README.md and CHANGELOG.md, sometimes STORY.md for every project and present those on the project page.
|
15
13
|
|
16
|
-
|
14
|
+
It utilizes [Pandoc](https://pandoc.org) for Markdown to HTML translation; source markdonw could be [Pandoc Markdown](https://pandoc.org/MANUAL.html#pandocs-markdown).
|
17
15
|
|
18
|
-
|
19
|
-
require "sancho"
|
20
|
-
source, folders = Sancho.tasks
|
21
|
-
Rake.application.rake_require source, folders
|
22
|
-
```
|
23
|
-
|
24
|
-
Install [pandoc](https://pandoc.org/installing.html)
|
16
|
+
## Installation
|
25
17
|
|
26
|
-
|
18
|
+
Install the gem
|
27
19
|
|
28
|
-
|
20
|
+
gem install sancho
|
29
21
|
|
30
|
-
|
22
|
+
Or add it by
|
31
23
|
|
32
|
-
|
24
|
+
bundle add sancho --git https://github.com/nvoynov/sancho.git
|
33
25
|
|
34
|
-
|
26
|
+
Install [pandoc](https://pandoc.org/installing.html)
|
35
27
|
|
36
|
-
|
28
|
+
## Usage
|
37
29
|
|
38
|
-
|
30
|
+
[Basic flow]{.underline}
|
39
31
|
|
40
|
-
|
32
|
+
# go to tareget directory
|
33
|
+
cd my_thing
|
34
|
+
# create .sancho.yml configuration file and copy basis site assets
|
35
|
+
sancho init
|
36
|
+
# do some configuration and template changes
|
37
|
+
# then build the site
|
38
|
+
sancho build
|
39
|
+
# test the site
|
40
|
+
sancho serve
|
41
41
|
|
42
42
|
[Template]{.underline}
|
43
43
|
|
44
|
-
|
44
|
+
To change template just place your `_layouts/template.html` file. Read [Pandoc Templates](https://pandoc.org/MANUAL.html#templates) section for details.
|
45
45
|
|
46
46
|
## Links
|
47
47
|
|
data/Rakefile
CHANGED
data/docs/changelog.html
CHANGED
@@ -1,96 +1,90 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="pandoc" />
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
7
|
-
<meta name="keywords" content="static-site-generator, github-pages-generator, ruby" />
|
8
|
-
<title>Sancho Changelog</title>
|
9
|
-
<style>
|
10
|
-
code{white-space: pre-wrap;}
|
11
|
-
span.smallcaps{font-variant: small-caps;}
|
12
|
-
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
13
|
-
div.column{flex: auto; overflow-x: auto;}
|
14
|
-
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<
|
33
|
-
|
34
|
-
</
|
35
|
-
<
|
36
|
-
|
37
|
-
</
|
38
|
-
<
|
39
|
-
<
|
40
|
-
|
41
|
-
<
|
42
|
-
<
|
43
|
-
<li><a href="#
|
44
|
-
|
45
|
-
<li><a href="#section
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
</
|
52
|
-
</
|
53
|
-
|
54
|
-
<
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
</
|
62
|
-
|
63
|
-
<h2 id="
|
64
|
-
<
|
65
|
-
<
|
66
|
-
<li
|
67
|
-
</
|
68
|
-
<
|
69
|
-
<
|
70
|
-
|
71
|
-
<
|
72
|
-
<
|
73
|
-
<
|
74
|
-
<li>
|
75
|
-
|
76
|
-
</
|
77
|
-
<
|
78
|
-
<
|
79
|
-
<li>
|
80
|
-
|
81
|
-
</
|
82
|
-
<
|
83
|
-
<
|
84
|
-
|
85
|
-
<
|
86
|
-
|
87
|
-
<
|
88
|
-
|
89
|
-
|
90
|
-
</
|
91
|
-
<div id="footer">
|
92
|
-
<hr />
|
93
|
-
<p>© 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
|
94
|
-
</div>
|
95
|
-
</body>
|
96
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="generator" content="pandoc" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
7
|
+
<meta name="keywords" content="static-site-generator, github-pages-generator, ruby" />
|
8
|
+
<title>Sancho Changelog</title>
|
9
|
+
<style>
|
10
|
+
code{white-space: pre-wrap;}
|
11
|
+
span.smallcaps{font-variant: small-caps;}
|
12
|
+
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
13
|
+
div.column{flex: auto; overflow-x: auto;}
|
14
|
+
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
15
|
+
/* The extra [class] is a hack that increases specificity enough to
|
16
|
+
override a similar rule in reveal.js */
|
17
|
+
ul.task-list[class]{list-style: none;}
|
18
|
+
ul.task-list li input[type="checkbox"] {
|
19
|
+
font-size: inherit;
|
20
|
+
width: 0.8em;
|
21
|
+
margin: 0 0.8em 0.2em -1.6em;
|
22
|
+
vertical-align: middle;
|
23
|
+
}
|
24
|
+
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
25
|
+
</style>
|
26
|
+
<link rel="stylesheet" href="css/styles.css" />
|
27
|
+
<!--[if lt IE 9]>
|
28
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
29
|
+
<![endif]-->
|
30
|
+
</head>
|
31
|
+
<body>
|
32
|
+
<p class="navbar">
|
33
|
+
<span class="smallcaps">= <strong>“Sancho” Pages Puncher</strong> = <a
|
34
|
+
href="readme.html">Readme</a> ~ <a href="changelog.html">Changelog</a> ~
|
35
|
+
<a href="story.html">Story</a> ~ <a
|
36
|
+
href="https://github.com/nvoynov/sancho">Github</a></span>
|
37
|
+
</p>
|
38
|
+
<header id="title-block-header">
|
39
|
+
<h1 class="title">Sancho Changelog</h1>
|
40
|
+
</header>
|
41
|
+
<nav id="TOC" role="doc-toc">
|
42
|
+
<ul>
|
43
|
+
<li><a href="#todo" id="toc-todo">[TODO]</a></li>
|
44
|
+
<li><a href="#unreleased" id="toc-unreleased">[Unreleased]</a></li>
|
45
|
+
<li><a href="#section" id="toc-section">[0.4.0] - 2024-03-07</a></li>
|
46
|
+
<li><a href="#section-1" id="toc-section-1">[0.3.0] -
|
47
|
+
2023-02-11</a></li>
|
48
|
+
<li><a href="#section-2" id="toc-section-2">[0.2.0] -
|
49
|
+
2023-01-30</a></li>
|
50
|
+
<li><a href="#section-3" id="toc-section-3">[0.1.0] -
|
51
|
+
2023-01-28</a></li>
|
52
|
+
</ul>
|
53
|
+
</nav>
|
54
|
+
<h2 id="todo">[TODO]</h2>
|
55
|
+
<ul class="task-list">
|
56
|
+
<li><label><input type="checkbox" />fix config.ru for serving
|
57
|
+
locally</label></li>
|
58
|
+
<li><label><input type="checkbox" />having template, is there any sense
|
59
|
+
in header, footer?</label></li>
|
60
|
+
<li><label><input type="checkbox" />page collections with own collection
|
61
|
+
layout and index.html</label></li>
|
62
|
+
</ul>
|
63
|
+
<h2 id="unreleased">[Unreleased]</h2>
|
64
|
+
<h2 id="section">[0.4.0] - 2024-03-07</h2>
|
65
|
+
<ul>
|
66
|
+
<li>designed new model based on Data.define</li>
|
67
|
+
<li>designed tests for Rake tasks</li>
|
68
|
+
<li>improved <code>sancho:init</code> output</li>
|
69
|
+
<li>improved <code>sancho:docs</code> using Dir.mktempdir</li>
|
70
|
+
</ul>
|
71
|
+
<h2 id="section-1">[0.3.0] - 2023-02-11</h2>
|
72
|
+
<ul>
|
73
|
+
<li>packed as a gem</li>
|
74
|
+
<li>added <code>sancho:init</code> rake task</li>
|
75
|
+
</ul>
|
76
|
+
<h2 id="section-2">[0.2.0] - 2023-01-30</h2>
|
77
|
+
<ul>
|
78
|
+
<li>added styles (pandoc.css with sticky navbar and changed code)</li>
|
79
|
+
<li>added rackup</li>
|
80
|
+
</ul>
|
81
|
+
<h2 id="section-3">[0.1.0] - 2023-01-28</h2>
|
82
|
+
<ul>
|
83
|
+
<li>Project released</li>
|
84
|
+
</ul>
|
85
|
+
<div id="footer">
|
86
|
+
<hr />
|
87
|
+
<p>© 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
|
88
|
+
</div>
|
89
|
+
</body>
|
90
|
+
</html>
|