sancho 0.6.2 → 0.7.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 +4 -4
- data/.dockerignore +12 -0
- data/.rubocop.yml +73 -0
- data/.sancho.yml +7 -0
- data/CHANGELOG.md +12 -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 +63 -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
data/docs/index.html
CHANGED
@@ -1,159 +1,170 @@
|
|
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="ruby, github-pages-generator" />
|
8
|
-
<title>Sancho Readme</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
|
-
.sourceCode {
|
27
|
-
code.sourceCode > span {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
div.sourceCode {
|
32
|
-
}
|
33
|
-
@media
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
pre.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
code span
|
59
|
-
|
60
|
-
code span.
|
61
|
-
code span.
|
62
|
-
code span.
|
63
|
-
code span.
|
64
|
-
code span.
|
65
|
-
code span.
|
66
|
-
code span.
|
67
|
-
code span.
|
68
|
-
code span.
|
69
|
-
code span.
|
70
|
-
code span.
|
71
|
-
code span.
|
72
|
-
code span.
|
73
|
-
code span.
|
74
|
-
code span.
|
75
|
-
code span.
|
76
|
-
code span.
|
77
|
-
code span.
|
78
|
-
code span.
|
79
|
-
code span.
|
80
|
-
code span.
|
81
|
-
code span.
|
82
|
-
code span.
|
83
|
-
code span.
|
84
|
-
code span.
|
85
|
-
code span.
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
<
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<
|
97
|
-
|
98
|
-
</
|
99
|
-
<
|
100
|
-
|
101
|
-
</
|
102
|
-
<
|
103
|
-
<
|
104
|
-
|
105
|
-
<
|
106
|
-
<
|
107
|
-
<li><a href="#
|
108
|
-
</
|
109
|
-
</
|
110
|
-
<
|
111
|
-
<
|
112
|
-
href="
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<
|
121
|
-
<p>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<
|
127
|
-
|
128
|
-
<
|
129
|
-
<
|
130
|
-
<
|
131
|
-
<
|
132
|
-
<
|
133
|
-
<
|
134
|
-
<
|
135
|
-
<
|
136
|
-
|
137
|
-
<
|
138
|
-
<
|
139
|
-
<
|
140
|
-
</
|
141
|
-
<
|
142
|
-
<
|
143
|
-
<
|
144
|
-
|
145
|
-
|
146
|
-
<
|
147
|
-
<
|
148
|
-
<
|
149
|
-
|
150
|
-
<li
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<
|
155
|
-
|
156
|
-
|
157
|
-
</
|
158
|
-
|
159
|
-
|
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="ruby, github-pages-generator" />
|
8
|
+
<title>Sancho Readme</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
|
+
/* CSS for syntax highlighting */
|
26
|
+
pre > code.sourceCode { white-space: pre; position: relative; }
|
27
|
+
pre > code.sourceCode > span { line-height: 1.25; }
|
28
|
+
pre > code.sourceCode > span:empty { height: 1.2em; }
|
29
|
+
.sourceCode { overflow: visible; }
|
30
|
+
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
31
|
+
div.sourceCode { margin: 1em 0; }
|
32
|
+
pre.sourceCode { margin: 0; }
|
33
|
+
@media screen {
|
34
|
+
div.sourceCode { overflow: auto; }
|
35
|
+
}
|
36
|
+
@media print {
|
37
|
+
pre > code.sourceCode { white-space: pre-wrap; }
|
38
|
+
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
|
39
|
+
}
|
40
|
+
pre.numberSource code
|
41
|
+
{ counter-reset: source-line 0; }
|
42
|
+
pre.numberSource code > span
|
43
|
+
{ position: relative; left: -4em; counter-increment: source-line; }
|
44
|
+
pre.numberSource code > span > a:first-child::before
|
45
|
+
{ content: counter(source-line);
|
46
|
+
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
47
|
+
border: none; display: inline-block;
|
48
|
+
-webkit-touch-callout: none; -webkit-user-select: none;
|
49
|
+
-khtml-user-select: none; -moz-user-select: none;
|
50
|
+
-ms-user-select: none; user-select: none;
|
51
|
+
padding: 0 4px; width: 4em;
|
52
|
+
color: #aaaaaa;
|
53
|
+
}
|
54
|
+
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
|
55
|
+
div.sourceCode
|
56
|
+
{ }
|
57
|
+
@media screen {
|
58
|
+
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
59
|
+
}
|
60
|
+
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
|
61
|
+
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
|
62
|
+
code span.at { color: #7d9029; } /* Attribute */
|
63
|
+
code span.bn { color: #40a070; } /* BaseN */
|
64
|
+
code span.bu { color: #008000; } /* BuiltIn */
|
65
|
+
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
|
66
|
+
code span.ch { color: #4070a0; } /* Char */
|
67
|
+
code span.cn { color: #880000; } /* Constant */
|
68
|
+
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
|
69
|
+
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
|
70
|
+
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
|
71
|
+
code span.dt { color: #902000; } /* DataType */
|
72
|
+
code span.dv { color: #40a070; } /* DecVal */
|
73
|
+
code span.er { color: #ff0000; font-weight: bold; } /* Error */
|
74
|
+
code span.ex { } /* Extension */
|
75
|
+
code span.fl { color: #40a070; } /* Float */
|
76
|
+
code span.fu { color: #06287e; } /* Function */
|
77
|
+
code span.im { color: #008000; font-weight: bold; } /* Import */
|
78
|
+
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
|
79
|
+
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
|
80
|
+
code span.op { color: #666666; } /* Operator */
|
81
|
+
code span.ot { color: #007020; } /* Other */
|
82
|
+
code span.pp { color: #bc7a00; } /* Preprocessor */
|
83
|
+
code span.sc { color: #4070a0; } /* SpecialChar */
|
84
|
+
code span.ss { color: #bb6688; } /* SpecialString */
|
85
|
+
code span.st { color: #4070a0; } /* String */
|
86
|
+
code span.va { color: #19177c; } /* Variable */
|
87
|
+
code span.vs { color: #4070a0; } /* VerbatimString */
|
88
|
+
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
|
89
|
+
</style>
|
90
|
+
<link rel="stylesheet" href="css/styles.css" />
|
91
|
+
<!--[if lt IE 9]>
|
92
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
93
|
+
<![endif]-->
|
94
|
+
</head>
|
95
|
+
<body>
|
96
|
+
<p class="navbar">
|
97
|
+
<span class="smallcaps">= <strong>“Sancho” Pages Puncher</strong> = <a
|
98
|
+
href="readme.html">Readme</a> ~ <a href="changelog.html">Changelog</a> ~
|
99
|
+
<a href="story.html">Story</a> ~ <a
|
100
|
+
href="https://github.com/nvoynov/sancho">Github</a></span>
|
101
|
+
</p>
|
102
|
+
<header id="title-block-header">
|
103
|
+
<h1 class="title">Sancho Readme</h1>
|
104
|
+
</header>
|
105
|
+
<nav id="TOC" role="doc-toc">
|
106
|
+
<ul>
|
107
|
+
<li><a href="#overview" id="toc-overview">Overview</a></li>
|
108
|
+
<li><a href="#installation" id="toc-installation">Installation</a></li>
|
109
|
+
<li><a href="#usage" id="toc-usage">Usage</a>
|
110
|
+
<ul>
|
111
|
+
<li><a href="#basics" id="toc-basics">Basics</a></li>
|
112
|
+
<li><a href="#template" id="toc-template">Template</a></li>
|
113
|
+
</ul></li>
|
114
|
+
<li><a href="#links" id="toc-links">Links</a></li>
|
115
|
+
</ul>
|
116
|
+
</nav>
|
117
|
+
<h2 id="overview">Overview</h2>
|
118
|
+
<p><code>Sancho</code> is static site generator for Github Pages. It
|
119
|
+
supposed that your site will be placed in <code>docs</code> directory,
|
120
|
+
under <code>docs</code> git branch.</p>
|
121
|
+
<p>For rendering HTML <code>Sancho</code> utilizes <a
|
122
|
+
href="https://pandoc.org">Pandoc</a>, and it is supposed that your site
|
123
|
+
pages will be written in Markdown or <a
|
124
|
+
href="https://pandoc.org/MANUAL.html#pandocs-markdown">Pandoc
|
125
|
+
Markdown</a>.</p>
|
126
|
+
<p>By default configuration (<code>sancho.yml</code>) your site will
|
127
|
+
consists of two files <code>README.md</code> and
|
128
|
+
<code>CHANGELOG.md</code>. It will also create <code>robots.txt</code>
|
129
|
+
and <code>sitemap.xml</code> files. When you don’t need them - just
|
130
|
+
remove <code>*.erb</code> inside <code>_layouts</code> directory.</p>
|
131
|
+
<h2 id="installation">Installation</h2>
|
132
|
+
<p>Run</p>
|
133
|
+
<pre><code>bundle add sancho --git https://github.com/nvoynov/sancho.git</code></pre>
|
134
|
+
<p>Modify Rakefile adding</p>
|
135
|
+
<div class="sourceCode" id="cb2"><pre
|
136
|
+
class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">require</span> <span class="st">"rake"</span></span>
|
137
|
+
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">require</span> <span class="st">"sancho"</span></span>
|
138
|
+
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>source, folders <span class="kw">=</span> <span class="dt">Sancho</span><span class="at">.tasks</span></span>
|
139
|
+
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="dt">Rake</span><span class="at">.application.rake_require</span> source, folders</span></code></pre></div>
|
140
|
+
<p>Install <a href="https://pandoc.org/installing.html">pandoc</a></p>
|
141
|
+
<h2 id="usage">Usage</h2>
|
142
|
+
<h3 id="basics">Basics</h3>
|
143
|
+
<ol type="1">
|
144
|
+
<li>Commit your repo changes!</li>
|
145
|
+
<li>Run <code>$ git checkout docs</code></li>
|
146
|
+
<li>Run <code>$ rake sancho:init</code></li>
|
147
|
+
<li>Modify <code>sancho.yml</code> for pages and
|
148
|
+
<code>_layouts/header.md</code> for navbar</li>
|
149
|
+
<li>Run <code>$ rake sancho:generate</code></li>
|
150
|
+
<li>Run <code>$ git push -u origin docs</code></li>
|
151
|
+
</ol>
|
152
|
+
<h3 id="template">Template</h3>
|
153
|
+
<p>You can provide your own HTML template by placing
|
154
|
+
<code>_layouts/template.html</code> file. Read <a
|
155
|
+
href="https://pandoc.org/MANUAL.html#templates">Pandoc Templates</a>
|
156
|
+
section for details.</p>
|
157
|
+
<h2 id="links">Links</h2>
|
158
|
+
<ul>
|
159
|
+
<li><a href="https://www.zenspider.com/projects/zenweb.html">Zenweb,
|
160
|
+
stupid fast static website generation</a></li>
|
161
|
+
<li><a
|
162
|
+
href="https://devcenter.heroku.com/articles/static-sites-ruby">Creating
|
163
|
+
Static Sites in Ruby with Rack</a></li>
|
164
|
+
</ul>
|
165
|
+
<div id="footer">
|
166
|
+
<hr />
|
167
|
+
<p>© 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
|
168
|
+
</div>
|
169
|
+
</body>
|
170
|
+
</html>
|