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.
data/docs/readme.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
- ul.task-list{list-style: none;}
16
- ul.task-list li input[type="checkbox"] {
17
- width: 0.8em;
18
- margin: 0 0.8em 0.2em -1.6em;
19
- vertical-align: middle;
20
- }
21
- .display.math{display: block; text-align: center; margin: 0.5rem auto;}
22
- /* CSS for syntax highlighting */
23
- pre > code.sourceCode { white-space: pre; position: relative; }
24
- pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
25
- pre > code.sourceCode > span:empty { height: 1.2em; }
26
- .sourceCode { overflow: visible; }
27
- code.sourceCode > span { color: inherit; text-decoration: inherit; }
28
- div.sourceCode { margin: 1em 0; }
29
- pre.sourceCode { margin: 0; }
30
- @media screen {
31
- div.sourceCode { overflow: auto; }
32
- }
33
- @media print {
34
- pre > code.sourceCode { white-space: pre-wrap; }
35
- pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
36
- }
37
- pre.numberSource code
38
- { counter-reset: source-line 0; }
39
- pre.numberSource code > span
40
- { position: relative; left: -4em; counter-increment: source-line; }
41
- pre.numberSource code > span > a:first-child::before
42
- { content: counter(source-line);
43
- position: relative; left: -1em; text-align: right; vertical-align: baseline;
44
- border: none; display: inline-block;
45
- -webkit-touch-callout: none; -webkit-user-select: none;
46
- -khtml-user-select: none; -moz-user-select: none;
47
- -ms-user-select: none; user-select: none;
48
- padding: 0 4px; width: 4em;
49
- color: #aaaaaa;
50
- }
51
- pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
52
- div.sourceCode
53
- { }
54
- @media screen {
55
- pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
56
- }
57
- code span.al { color: #ff0000; font-weight: bold; } /* Alert */
58
- code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
59
- code span.at { color: #7d9029; } /* Attribute */
60
- code span.bn { color: #40a070; } /* BaseN */
61
- code span.bu { color: #008000; } /* BuiltIn */
62
- code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
63
- code span.ch { color: #4070a0; } /* Char */
64
- code span.cn { color: #880000; } /* Constant */
65
- code span.co { color: #60a0b0; font-style: italic; } /* Comment */
66
- code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
67
- code span.do { color: #ba2121; font-style: italic; } /* Documentation */
68
- code span.dt { color: #902000; } /* DataType */
69
- code span.dv { color: #40a070; } /* DecVal */
70
- code span.er { color: #ff0000; font-weight: bold; } /* Error */
71
- code span.ex { } /* Extension */
72
- code span.fl { color: #40a070; } /* Float */
73
- code span.fu { color: #06287e; } /* Function */
74
- code span.im { color: #008000; font-weight: bold; } /* Import */
75
- code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
76
- code span.kw { color: #007020; font-weight: bold; } /* Keyword */
77
- code span.op { color: #666666; } /* Operator */
78
- code span.ot { color: #007020; } /* Other */
79
- code span.pp { color: #bc7a00; } /* Preprocessor */
80
- code span.sc { color: #4070a0; } /* SpecialChar */
81
- code span.ss { color: #bb6688; } /* SpecialString */
82
- code span.st { color: #4070a0; } /* String */
83
- code span.va { color: #19177c; } /* Variable */
84
- code span.vs { color: #4070a0; } /* VerbatimString */
85
- code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
86
- </style>
87
- <link rel="stylesheet" href="css/styles.css" />
88
- <!--[if lt IE 9]>
89
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
90
- <![endif]-->
91
- </head>
92
- <body>
93
- <p class="navbar">
94
- <span class="smallcaps">= <strong>“Sancho” Pages Puncher</strong> = <a
95
- href="readme.html">Readme</a> ~ <a href="changelog.html">Changelog</a> ~
96
- <a href="story.html">Story</a> ~ <a
97
- href="https://github.com/nvoynov/sancho">Github</a></span>
98
- </p>
99
- <header id="title-block-header">
100
- <h1 class="title">Sancho Readme</h1>
101
- </header>
102
- <nav id="TOC" role="doc-toc">
103
- <ul>
104
- <li><a href="#overview" id="toc-overview">Overview</a></li>
105
- <li><a href="#installation" id="toc-installation">Installation</a></li>
106
- <li><a href="#usage" id="toc-usage">Usage</a></li>
107
- <li><a href="#links" id="toc-links">Links</a></li>
108
- </ul>
109
- </nav>
110
- <h2 id="overview">Overview</h2>
111
- <p><code>Sancho</code> is static site generator for <a
112
- href="https://pages.github.com/">Github Pages</a> that proposes placing
113
- your site content under <code>docs</code> directory in a separate git
114
- branch branch.</p>
115
- <p>For rendering HTML <code>Sancho</code> utilizes <a
116
- href="https://pandoc.org">Pandoc</a>, and it is supposed that your site
117
- pages will be written in Markdown or <a
118
- href="https://pandoc.org/MANUAL.html#pandocs-markdown">Pandoc
119
- Markdown</a>.</p>
120
- <h2 id="installation">Installation</h2>
121
- <p>Run</p>
122
- <pre><code>bundle add sancho --git https://github.com/nvoynov/sancho.git</code></pre>
123
- <p>Require Sancho in Rakefile</p>
124
- <div class="sourceCode" id="cb2"><pre
125
- 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">&quot;sancho&quot;</span></span>
126
- <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>source, folders <span class="kw">=</span> <span class="dt">Sancho</span><span class="at">.tasks</span></span>
127
- <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="dt">Rake</span><span class="at">.application.rake_require</span> source, folders</span></code></pre></div>
128
- <p>Install <a href="https://pandoc.org/installing.html">pandoc</a></p>
129
- <h2 id="usage">Usage</h2>
130
- <p><u>Basic flow</u></p>
131
- <ol type="1">
132
- <li>Commit your repo changes!</li>
133
- <li>Run <code>$ git checkout docs</code></li>
134
- <li>Run <code>$ rake sancho:init</code></li>
135
- <li>Customize <code>sancho.yml</code> for pages and
136
- <code>_layouts/header.md</code> for navbar</li>
137
- <li>Run <code>$ rake sancho:generate</code> to create your site</li>
138
- <li>Run <code>$ rake sancho:serve</code> to run the site locally</li>
139
- <li>Run <code>$ git push -u origin docs</code></li>
140
- </ol>
141
- <p><u>Template</u></p>
142
- <p>You can provide your own HTML template by placing
143
- <code>_layouts/template.html</code> file. Read <a
144
- href="https://pandoc.org/MANUAL.html#templates">Pandoc Templates</a>
145
- section for details.</p>
146
- <h2 id="links">Links</h2>
147
- <ul>
148
- <li><a href="https://www.zenspider.com/projects/zenweb.html">Zenweb,
149
- stupid fast static website generation</a></li>
150
- <li><a
151
- href="https://devcenter.heroku.com/articles/static-sites-ruby">Creating
152
- Static Sites in Ruby with Rack</a></li>
153
- </ul>
154
- <div id="footer">
155
- <hr />
156
- <p>© 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
157
- </div>
158
- </body>
159
- </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="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">&quot;rake&quot;</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">&quot;sancho&quot;</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>
data/docs/sitemap.xml CHANGED
@@ -1,30 +1,30 @@
1
- <?xml version='1.0' encoding='UTF-8'?>
2
- <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
4
- xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
5
-
6
- <url>
7
- <loc>noynov.github.io/sancho/</loc>
8
- <lastmod>2024-03-08</lastmod>
9
- <changefreq>weekly</changefreq>
10
- <priority>1.0</priority>
11
- </url>
12
- <url>
13
- <loc>noynov.github.io/sancho/readme.html</loc>
14
- <lastmod>2024-03-08</lastmod>
15
- <changefreq>weekly</changefreq>
16
- <priority>0.8</priority>
17
- </url>
18
- <url>
19
- <loc>noynov.github.io/sancho/changelog.html</loc>
20
- <lastmod>2024-03-08</lastmod>
21
- <changefreq>weekly</changefreq>
22
- <priority>0.8</priority>
23
- </url>
24
- <url>
25
- <loc>noynov.github.io/sancho/story.html</loc>
26
- <lastmod>2024-03-08</lastmod>
27
- <changefreq>weekly</changefreq>
28
- <priority>0.8</priority>
29
- </url>
30
- </urlset>
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
4
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
5
+
6
+ <url>
7
+ <loc>noynov.github.io/sancho/</loc>
8
+ <lastmod>2024-03-07</lastmod>
9
+ <changefreq>weekly</changefreq>
10
+ <priority>1.0</priority>
11
+ </url>
12
+ <url>
13
+ <loc>noynov.github.io/sancho/readme.html</loc>
14
+ <lastmod>2024-03-07</lastmod>
15
+ <changefreq>weekly</changefreq>
16
+ <priority>0.8</priority>
17
+ </url>
18
+ <url>
19
+ <loc>noynov.github.io/sancho/changelog.html</loc>
20
+ <lastmod>2024-03-07</lastmod>
21
+ <changefreq>weekly</changefreq>
22
+ <priority>0.8</priority>
23
+ </url>
24
+ <url>
25
+ <loc>noynov.github.io/sancho/story.html</loc>
26
+ <lastmod>2024-03-07</lastmod>
27
+ <changefreq>weekly</changefreq>
28
+ <priority>0.8</priority>
29
+ </url>
30
+ </urlset>
data/docs/story.html CHANGED
@@ -1,57 +1,60 @@
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="dcterms.date" content="2023-01-28" />
8
- <meta name="keywords" content="ruby, github-pages-generator" />
9
- <title>Sancho Story</title>
10
- <style>
11
- code{white-space: pre-wrap;}
12
- span.smallcaps{font-variant: small-caps;}
13
- div.columns{display: flex; gap: min(4vw, 1.5em);}
14
- div.column{flex: auto; overflow-x: auto;}
15
- div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
16
- ul.task-list{list-style: none;}
17
- ul.task-list li input[type="checkbox"] {
18
- width: 0.8em;
19
- margin: 0 0.8em 0.2em -1.6em;
20
- vertical-align: middle;
21
- }
22
- .display.math{display: block; text-align: center; margin: 0.5rem auto;}
23
- </style>
24
- <link rel="stylesheet" href="css/styles.css" />
25
- <!--[if lt IE 9]>
26
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
27
- <![endif]-->
28
- </head>
29
- <body>
30
- <p class="navbar">
31
- <span class="smallcaps">= <strong>“Sancho” Pages Puncher</strong> = <a
32
- href="readme.html">Readme</a> ~ <a href="changelog.html">Changelog</a> ~
33
- <a href="story.html">Story</a> ~ <a
34
- href="https://github.com/nvoynov/sancho">Github</a></span>
35
- </p>
36
- <header id="title-block-header">
37
- <h1 class="title">Sancho Story</h1>
38
- <p class="date">2023-01-28</p>
39
- </header>
40
- <p>Exercising with <a href="https://github.com/nvoynov/punch">Punch</a>
41
- and inspired by the result I decided to propose my private “clean domain
42
- development” services. Having written some content drafts, my first
43
- thought was to just use Jekyll as it is on nvoynov.github.io, but have
44
- searched a bit through the Internet I bumped into <a
45
- href="https://github.com/seattlerb/zenweb">zenweb</a> and decided to
46
- give it a try.</p>
47
- <p>Fortunately, something went wrong :) and a few of my content pages,
48
- despite all my dancing with a tambourine, just failed to translate into
49
- HTML. Being looking through <code>zenweb</code> code I realized that
50
- it’s actually easy to design on my own.</p>
51
- <p>So meet the Sancho :)</p>
52
- <div id="footer">
53
- <hr />
54
- <p 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
55
- </div>
56
- </body>
57
- </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="dcterms.date" content="2023-01-28" />
8
+ <meta name="keywords" content="ruby, github-pages-generator" />
9
+ <title>Sancho Story</title>
10
+ <style>
11
+ code{white-space: pre-wrap;}
12
+ span.smallcaps{font-variant: small-caps;}
13
+ div.columns{display: flex; gap: min(4vw, 1.5em);}
14
+ div.column{flex: auto; overflow-x: auto;}
15
+ div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
16
+ /* The extra [class] is a hack that increases specificity enough to
17
+ override a similar rule in reveal.js */
18
+ ul.task-list[class]{list-style: none;}
19
+ ul.task-list li input[type="checkbox"] {
20
+ font-size: inherit;
21
+ width: 0.8em;
22
+ margin: 0 0.8em 0.2em -1.6em;
23
+ vertical-align: middle;
24
+ }
25
+ .display.math{display: block; text-align: center; margin: 0.5rem auto;}
26
+ </style>
27
+ <link rel="stylesheet" href="css/styles.css" />
28
+ <!--[if lt IE 9]>
29
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
30
+ <![endif]-->
31
+ </head>
32
+ <body>
33
+ <p class="navbar">
34
+ <span class="smallcaps">= <strong>“Sancho” Pages Puncher</strong> = <a
35
+ href="readme.html">Readme</a> ~ <a href="changelog.html">Changelog</a> ~
36
+ <a href="story.html">Story</a> ~ <a
37
+ href="https://github.com/nvoynov/sancho">Github</a></span>
38
+ </p>
39
+ <header id="title-block-header">
40
+ <h1 class="title">Sancho Story</h1>
41
+ <p class="date">2023-01-28</p>
42
+ </header>
43
+ <p>Exercising with <a href="https://github.com/nvoynov/punch">Punch</a>
44
+ and inspired by the result I decided to propose my private “clean domain
45
+ development” services. Having written some content drafts, my first
46
+ thought was to just use Jekyll as it is on nvoynov.github.io, but have
47
+ searched a bit through the Internet I bumped into <a
48
+ href="https://github.com/seattlerb/zenweb">zenweb</a> and decided to
49
+ give it a try.</p>
50
+ <p>Fortunately, something went wrong :) and a few of my content pages,
51
+ despite all my dancing with a tambourine, just failed to translate into
52
+ HTML. Being looking through <code>zenweb</code> code I realized that
53
+ it’s actually easy to design on my own.</p>
54
+ <p>So meet the Sancho :)</p>
55
+ <div id="footer">
56
+ <hr />
57
+ <p>© 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a></p>
58
+ </div>
59
+ </body>
60
+ </html>
data/exe/sancho ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'sancho'
3
+
4
+ Sancho::CLI.call(ARGV)
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Sitemap: https://<%= site.domain %>/sitemap.xml
@@ -4,14 +4,14 @@
4
4
  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
5
5
 
6
6
  <url>
7
- <loc><%= @site.domain %>/</loc>
8
- <lastmod><%= @site.pages_by_date.first.date %></lastmod>
7
+ <loc><%= site.domain %>/</loc>
8
+ <lastmod><%= site.pages_by_date.first.date %></lastmod>
9
9
  <changefreq>weekly</changefreq>
10
10
  <priority>1.0</priority>
11
11
  </url>
12
- <% @site.pages.each do |page| %>
12
+ <% site.pages.each do |page| %>
13
13
  <url>
14
- <loc><%= @site.domain %>/<%= page.url %></loc>
14
+ <loc><%= site.domain %>/<%= page.url %></loc>
15
15
  <lastmod><%= page.date %></lastmod>
16
16
  <changefreq>weekly</changefreq>
17
17
  <priority>0.8</priority>
data/lib/sancho/cli.rb ADDED
@@ -0,0 +1,57 @@
1
+ require_relative 'config'
2
+ require_relative 'model'
3
+ require_relative 'tasks'
4
+
5
+ module Sancho
6
+
7
+ # Command line interface
8
+ module CLI
9
+ module_function
10
+
11
+ def call(argv)
12
+ case argv.first&.to_sym
13
+ when :init
14
+ init
15
+ when :build
16
+ build
17
+ when :serve
18
+ serve
19
+ when :help
20
+ puts BANNER
21
+ else
22
+ puts "Sancho: didn't get you", BANNER
23
+ end
24
+ end
25
+
26
+ def init
27
+ Task::ReadConfig.run
28
+ Task::CopyAssets.run
29
+ end
30
+
31
+ def build
32
+ conf = Task::ReadConfig.run
33
+ Task::BuildSite.run(conf)
34
+ end
35
+
36
+ def serve
37
+ Task::ServeSite.run
38
+ end
39
+
40
+ BANNER = <<~STR
41
+ Sancho GitHub Pages generator v#{Sancho::VERSION}
42
+
43
+ Usage:
44
+ # initialize by creating .sancho.yml config file
45
+ sancho init
46
+
47
+ # build site by .sancho.yml configuration
48
+ sancho build
49
+
50
+ # serve the built site
51
+ sancho serve
52
+
53
+ # to see this message
54
+ sancho help
55
+ STR
56
+ end
57
+ end