yass 0.0.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 +7 -0
- data/README.md +47 -0
- data/bin/yass +19 -0
- data/lib/template/layouts/default.html.liquid +14 -0
- data/lib/template/site/assets/highlight-default.css +117 -0
- data/lib/template/site/assets/highlight.min.js +1470 -0
- data/lib/template/site/index.default.html.liquid +1 -0
- data/lib/template/templates/css_links.liquid +4 -0
- data/lib/template/templates/js_scripts.liquid +4 -0
- data/lib/yass/cli/helpers.rb +71 -0
- data/lib/yass/cli/runner.rb +38 -0
- data/lib/yass/cli.rb +6 -0
- data/lib/yass/config.rb +32 -0
- data/lib/yass/generator.rb +47 -0
- data/lib/yass/liquid_filters.rb +10 -0
- data/lib/yass/liquid_highlight_tag.rb +14 -0
- data/lib/yass/liquid_template.rb +49 -0
- data/lib/yass/source.rb +44 -0
- data/lib/yass/version.rb +3 -0
- data/lib/yass.rb +14 -0
- metadata +90 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b9e4145b2a4bd254b30c955ddfcceb27a5d921c3efbc8cffc86daae9e1baa5c
|
4
|
+
data.tar.gz: 439dd4814f60ae2621674bcd179e49a47ff9c899513ef4da4307036ee1bbe26f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2e41fb008955497801275a312189ace07d3f8488d3d1a7f88e772dd75a22710e12cad80b465cf8725b08c4fc3c2a6fcbc211a1adda7f697cd072cc5e9ae0f5c0
|
7
|
+
data.tar.gz: ee98de21f39a6d63c4dbe130af0d52117c83aebd1ba352c57419f819f3e4eab0523207f37c07c348a3a2c2679e9b50a657bb1c61fce270b7cfd9a9c940e7b45a
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# yass
|
2
|
+
|
3
|
+
Yet Another Static Site (generator)
|
4
|
+
|
5
|
+
Yass is an incredibly unopinioanted static site generator. Here's how it works:
|
6
|
+
|
7
|
+
* You write everything by hand under `site/`.
|
8
|
+
* Everything under `site/` is copied to `dist/`.
|
9
|
+
* [Markdown](https://commonmark.org/) (`.md`) and [Liquid](https://shopify.github.io/liquid/) (`.liquid`) files are processed.
|
10
|
+
* Liquid layouts and templates can be placed into `layouts/` and `templates/`.
|
11
|
+
* Helpers are available in addition to Liquid's standard functionality.
|
12
|
+
* Syntax highlighting via [Highlight.js](https://highlightjs.org/).
|
13
|
+
* Want to preview your site? Build it and open `dist/index.html` in your browser.
|
14
|
+
|
15
|
+
## Getting started
|
16
|
+
|
17
|
+
```bash
|
18
|
+
$ gem install yass
|
19
|
+
$ yass init blog
|
20
|
+
Creating blog/layouts/default.html.liquid
|
21
|
+
Creating blog/site/assets/highlight-default.css
|
22
|
+
Creating blog/site/assets/highlight.min.js
|
23
|
+
Creating blog/site/index.default.html.liquid
|
24
|
+
Creating blog/templates/css_links.liquid
|
25
|
+
Creating blog/templates/js_scripts.liquid
|
26
|
+
$ cd blog
|
27
|
+
```
|
28
|
+
|
29
|
+
## Building
|
30
|
+
|
31
|
+
The built site will be placed into `dist`.
|
32
|
+
|
33
|
+
```bash
|
34
|
+
yass build
|
35
|
+
```
|
36
|
+
|
37
|
+
If you're building for local viewing, use the `--local` option. It ensures any generated URLs ending in `/` have `.index.html` appended.
|
38
|
+
|
39
|
+
```bash
|
40
|
+
yass build --local
|
41
|
+
```
|
42
|
+
|
43
|
+
## License & copywrite
|
44
|
+
|
45
|
+
MIT License. See LICENSE for details.
|
46
|
+
|
47
|
+
Copyright (c) 2025 Jordan Hollinger.
|
data/bin/yass
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Used for local testing
|
4
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') if ENV["DEV"] == "1"
|
5
|
+
|
6
|
+
require 'yass'
|
7
|
+
|
8
|
+
case Yass::CLI::Helpers.get_cmd(ARGV)
|
9
|
+
when :build
|
10
|
+
config = Yass::CLI::Helpers.get_opts!
|
11
|
+
retval = Yass::CLI::Runner.build(config, argv: ARGV)
|
12
|
+
exit retval
|
13
|
+
when :init
|
14
|
+
config = Yass::CLI::Helpers.get_opts!
|
15
|
+
retval = Yass::CLI::Runner.init(config, argv: ARGV)
|
16
|
+
exit retval
|
17
|
+
else
|
18
|
+
Yass::CLI::Helpers.help!
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6
|
+
<title>{{ page.title }}</title>
|
7
|
+
{% render "css_links", files: files, page: page %}
|
8
|
+
{% render "js_scripts", files: files, page: page %}
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
{{ content }}
|
12
|
+
<script>hljs.highlightAll()</script>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,117 @@
|
|
1
|
+
pre code.hljs {
|
2
|
+
display: block;
|
3
|
+
overflow-x: auto;
|
4
|
+
padding: 1em
|
5
|
+
}
|
6
|
+
code.hljs {
|
7
|
+
padding: 3px 5px
|
8
|
+
}
|
9
|
+
/*!
|
10
|
+
Theme: Default
|
11
|
+
Description: Original highlight.js style
|
12
|
+
Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
|
13
|
+
Maintainer: @highlightjs/core-team
|
14
|
+
Website: https://highlightjs.org/
|
15
|
+
License: see project LICENSE
|
16
|
+
Touched: 2021
|
17
|
+
*/
|
18
|
+
/*
|
19
|
+
This is left on purpose making default.css the single file that can be lifted
|
20
|
+
as-is from the repository directly without the need for a build step
|
21
|
+
|
22
|
+
Typically this "required" baseline CSS is added by `makestuff.js` during build.
|
23
|
+
*/
|
24
|
+
pre code.hljs {
|
25
|
+
display: block;
|
26
|
+
overflow-x: auto;
|
27
|
+
padding: 1em
|
28
|
+
}
|
29
|
+
code.hljs {
|
30
|
+
padding: 3px 5px
|
31
|
+
}
|
32
|
+
/* end baseline CSS */
|
33
|
+
.hljs {
|
34
|
+
background: #F3F3F3;
|
35
|
+
color: #444
|
36
|
+
}
|
37
|
+
/* Base color: saturation 0; */
|
38
|
+
.hljs-subst {
|
39
|
+
/* default */
|
40
|
+
|
41
|
+
}
|
42
|
+
/* purposely ignored */
|
43
|
+
.hljs-formula,
|
44
|
+
.hljs-attr,
|
45
|
+
.hljs-property,
|
46
|
+
.hljs-params {
|
47
|
+
|
48
|
+
}
|
49
|
+
.hljs-comment {
|
50
|
+
color: #697070
|
51
|
+
}
|
52
|
+
.hljs-tag,
|
53
|
+
.hljs-punctuation {
|
54
|
+
color: #444a
|
55
|
+
}
|
56
|
+
.hljs-tag .hljs-name,
|
57
|
+
.hljs-tag .hljs-attr {
|
58
|
+
color: #444
|
59
|
+
}
|
60
|
+
.hljs-keyword,
|
61
|
+
.hljs-attribute,
|
62
|
+
.hljs-selector-tag,
|
63
|
+
.hljs-meta .hljs-keyword,
|
64
|
+
.hljs-doctag,
|
65
|
+
.hljs-name {
|
66
|
+
font-weight: bold
|
67
|
+
}
|
68
|
+
/* User color: hue: 0 */
|
69
|
+
.hljs-type,
|
70
|
+
.hljs-string,
|
71
|
+
.hljs-number,
|
72
|
+
.hljs-selector-id,
|
73
|
+
.hljs-selector-class,
|
74
|
+
.hljs-quote,
|
75
|
+
.hljs-template-tag,
|
76
|
+
.hljs-deletion {
|
77
|
+
color: #880000
|
78
|
+
}
|
79
|
+
.hljs-title,
|
80
|
+
.hljs-section {
|
81
|
+
color: #880000;
|
82
|
+
font-weight: bold
|
83
|
+
}
|
84
|
+
.hljs-regexp,
|
85
|
+
.hljs-symbol,
|
86
|
+
.hljs-variable,
|
87
|
+
.hljs-template-variable,
|
88
|
+
.hljs-link,
|
89
|
+
.hljs-selector-attr,
|
90
|
+
.hljs-operator,
|
91
|
+
.hljs-selector-pseudo {
|
92
|
+
color: #ab5656
|
93
|
+
}
|
94
|
+
/* Language color: hue: 90; */
|
95
|
+
.hljs-literal {
|
96
|
+
color: #695
|
97
|
+
}
|
98
|
+
.hljs-built_in,
|
99
|
+
.hljs-bullet,
|
100
|
+
.hljs-code,
|
101
|
+
.hljs-addition {
|
102
|
+
color: #397300
|
103
|
+
}
|
104
|
+
/* Meta color: hue: 200 */
|
105
|
+
.hljs-meta {
|
106
|
+
color: #1f7199
|
107
|
+
}
|
108
|
+
.hljs-meta .hljs-string {
|
109
|
+
color: #38a
|
110
|
+
}
|
111
|
+
/* Misc effects */
|
112
|
+
.hljs-emphasis {
|
113
|
+
font-style: italic
|
114
|
+
}
|
115
|
+
.hljs-strong {
|
116
|
+
font-weight: bold
|
117
|
+
}
|