rynz 1.0.0__tar.gz
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.
- rynz-1.0.0/LICENSE +21 -0
- rynz-1.0.0/PKG-INFO +349 -0
- rynz-1.0.0/README.md +313 -0
- rynz-1.0.0/rynz/__init__.py +25 -0
- rynz-1.0.0/rynz/builder.py +242 -0
- rynz-1.0.0/rynz/creator.py +410 -0
- rynz-1.0.0/rynz/manage.py +287 -0
- rynz-1.0.0/rynz/rynz.py +257 -0
- rynz-1.0.0/rynz.egg-info/PKG-INFO +349 -0
- rynz-1.0.0/rynz.egg-info/SOURCES.txt +14 -0
- rynz-1.0.0/rynz.egg-info/dependency_links.txt +1 -0
- rynz-1.0.0/rynz.egg-info/entry_points.txt +2 -0
- rynz-1.0.0/rynz.egg-info/requires.txt +4 -0
- rynz-1.0.0/rynz.egg-info/top_level.txt +1 -0
- rynz-1.0.0/setup.cfg +4 -0
- rynz-1.0.0/setup.py +49 -0
rynz-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Nihar Samantaray
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
rynz-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rynz
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A minimal, fast static site generator built for Markdown lovers.
|
|
5
|
+
Home-page: https://gitlab.com/niharokz/rynz
|
|
6
|
+
Author: Nihar
|
|
7
|
+
Author-email: hi@nihars.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: python,static site generator,markdown,Jinja2,pyyaml
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: markdown2
|
|
22
|
+
Requires-Dist: Jinja2
|
|
23
|
+
Requires-Dist: pyyaml
|
|
24
|
+
Requires-Dist: rich
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: keywords
|
|
32
|
+
Dynamic: license
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
Dynamic: requires-dist
|
|
35
|
+
Dynamic: summary
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Rynz
|
|
39
|
+
|
|
40
|
+
🕊️ **Rynz: Really Your Note Zenerator**
|
|
41
|
+
Rynz is a lightweight, JavaScript-free static site generator crafted for developers who value Markdown, speed, and simplicity. Built with Python and Jinja2, it delivers fast, customizable static websites with an intuitive CLI, optimized page generation, and clean, minimal templates.
|
|
42
|
+
|
|
43
|
+
## Why Choose Rynz?
|
|
44
|
+
- **Blazing Fast**: Optimized page generation for rapid site builds.
|
|
45
|
+
- **No JavaScript**: Lightweight, clean HTML output by default.
|
|
46
|
+
- **Clean Templates**: Streamlined Jinja2 templates for easy customization.
|
|
47
|
+
- **Python-Powered**: Modular, forkable codebase for extensibility.
|
|
48
|
+
- **Markdown-First**: Effortless content creation with Markdown.
|
|
49
|
+
- **Open-Source**: Licensed under the [MIT License](#license).
|
|
50
|
+
|
|
51
|
+
## Table of Contents
|
|
52
|
+
- [Installation](#installation)
|
|
53
|
+
- [Usage](#usage)
|
|
54
|
+
- [Configuration](#configuration)
|
|
55
|
+
- [Folder Structure](#folder-structure)
|
|
56
|
+
- [Advanced Features](#advanced-features)
|
|
57
|
+
- [Example](#example)
|
|
58
|
+
- [Changelog](#changelog)
|
|
59
|
+
- [Contributing](#contributing)
|
|
60
|
+
- [License](#license)
|
|
61
|
+
- [Contact](#contact)
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
Install Rynz via `pip` for the latest stable release:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install rynz
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Or install the development version from GitLab:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install git+https://gitlab.com/niharokz/rynz
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Prerequisites
|
|
78
|
+
- Python 3.8 or higher
|
|
79
|
+
- `pip` for dependency management
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
Rynz automatically installs:
|
|
83
|
+
- `pyyaml`: Parses `config.yml` and frontmatter.
|
|
84
|
+
- `jinja2`: Powers templating for HTML output.
|
|
85
|
+
- `markdown2`: Converts Markdown to HTML.
|
|
86
|
+
- `rich`: Enhances CLI with colorful output.
|
|
87
|
+
|
|
88
|
+
## Usage
|
|
89
|
+
|
|
90
|
+
Rynz provides a streamlined CLI for managing your static site. Run `rynz --help` for details.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
usage: rynz [-h] [-v] {create,add,deploy,serve,config,test,save} ...
|
|
94
|
+
|
|
95
|
+
🕊️ Rynz: Really Your Note Zenerator.
|
|
96
|
+
|
|
97
|
+
positional arguments:
|
|
98
|
+
{create,add,deploy,serve,config,test,save}
|
|
99
|
+
Available commands
|
|
100
|
+
create Create a new Rynz project.
|
|
101
|
+
add Create a new note or blog post.
|
|
102
|
+
deploy Convert Markdown files into static HTML
|
|
103
|
+
serve Serve your site locally at http://localhost:5555
|
|
104
|
+
config View or edit site configuration (config.yml)
|
|
105
|
+
test Test your Rynz setup and structure
|
|
106
|
+
save Save changes with Git (stage and commit)
|
|
107
|
+
|
|
108
|
+
options:
|
|
109
|
+
-h, --help show this help message and exit
|
|
110
|
+
-v, --version show program's version number and exit
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 1. Create a New Project
|
|
114
|
+
Initialize a new project with the default structure:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
rynz create my-site
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Sets up `my-site/` with `config.yml`, templates, and content directories.
|
|
121
|
+
|
|
122
|
+
### 2. Add a New Note or Post
|
|
123
|
+
Create a new Markdown file:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
rynz add pageName
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Generates `content/note/pageName.md` with frontmatter.
|
|
130
|
+
|
|
131
|
+
### 3. Deploy the Site
|
|
132
|
+
Convert Markdown to static HTML, outputting to `public/`:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
rynz deploy
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 4. Serve Locally
|
|
139
|
+
Preview your site with a local server:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
rynz serve
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Access at [http://localhost:5555](http://localhost:5555). Use a custom port:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
rynz serve -p 8080
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 5. Manage Configuration
|
|
152
|
+
View or edit `config.yml`:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
rynz config
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Check `rynz config --help` for specific options.
|
|
159
|
+
|
|
160
|
+
### 6. Test Your Setup
|
|
161
|
+
Validate your project structure and configuration:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
rynz test
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Ensures no missing files or invalid frontmatter.
|
|
168
|
+
|
|
169
|
+
### 7. Save Changes with Git
|
|
170
|
+
Stage and commit changes:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
rynz save
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Or commit with a custom message:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
rynz save -m "Your commit message"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Configuration
|
|
183
|
+
|
|
184
|
+
Customize your site with `config.yml` in the project root. Example:
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
site_title: My Rynz Site
|
|
188
|
+
base_url: https://example.com
|
|
189
|
+
theme: default
|
|
190
|
+
favicon: resource/favicon.ico
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Access in templates with Jinja2:
|
|
194
|
+
|
|
195
|
+
```html
|
|
196
|
+
<link rel="icon" href="{{ config.get('favicon') }}">
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Folder Structure
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
my-site/
|
|
203
|
+
|-- public/ # Generated HTML output
|
|
204
|
+
|-- config.yml # Site configuration
|
|
205
|
+
|-- content/ # Markdown content
|
|
206
|
+
| |-- header.md # Header content
|
|
207
|
+
| |-- footer.md # Footer content
|
|
208
|
+
| |-- home.md # Homepage content
|
|
209
|
+
| `-- note/ # Individual pages/notes
|
|
210
|
+
| `-- sample.md
|
|
211
|
+
|-- resource/ # Static assets (CSS, images, etc.)
|
|
212
|
+
| `-- style.css
|
|
213
|
+
`-- templates/ # Jinja2 templates
|
|
214
|
+
|-- home_template.html # Homepage template
|
|
215
|
+
`-- note_template.html # Note/page template
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Folder Breakdown
|
|
219
|
+
- **`config.yml`**: Site-wide settings (title, theme, etc.).
|
|
220
|
+
- **`content/`**: Markdown files for pages and notes.
|
|
221
|
+
- **`resource/`**: Static assets (CSS, images, favicon).
|
|
222
|
+
- **`templates/`**: Jinja2 templates for HTML output.
|
|
223
|
+
- **`public/`**: Built site output.
|
|
224
|
+
|
|
225
|
+
## Advanced Features
|
|
226
|
+
|
|
227
|
+
### 1. Faster Page Generation
|
|
228
|
+
Rynz v1.0.0 optimizes rendering with streamlined Markdown processing and efficient Jinja2 templating, significantly reducing build times.
|
|
229
|
+
|
|
230
|
+
### 2. Cleaner Templates
|
|
231
|
+
Templates are now more modular and minimal, with simplified Jinja2 syntax for easier customization and maintenance.
|
|
232
|
+
|
|
233
|
+
### 3. Homepage Visibility via Tags
|
|
234
|
+
Control homepage visibility with tags. Add `home` to frontmatter:
|
|
235
|
+
|
|
236
|
+
```markdown
|
|
237
|
+
---
|
|
238
|
+
tags: [home]
|
|
239
|
+
---
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Filter in `home_template.html`:
|
|
243
|
+
|
|
244
|
+
```html
|
|
245
|
+
{% for page in pages if 'home' in page.tags %}
|
|
246
|
+
<a href="{{ page.url }}">{{ page.title }}</a>
|
|
247
|
+
{% endfor %}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 4. Custom Metadata
|
|
251
|
+
Add per-page metadata:
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
meta: '<link rel="stylesheet" href="/extra.css">'
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Render in templates:
|
|
258
|
+
|
|
259
|
+
```html
|
|
260
|
+
{{ page.meta | safe }}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### 5. Extended Configuration
|
|
264
|
+
Add custom keys to `config.yml`:
|
|
265
|
+
|
|
266
|
+
```yaml
|
|
267
|
+
analytics_id: UA-XXXXX-Y
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Use in templates:
|
|
271
|
+
|
|
272
|
+
```html
|
|
273
|
+
<script src="https://analytics.com/{{ config.get('analytics_id') }}"></script>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Example
|
|
277
|
+
|
|
278
|
+
Explore a live Rynz-generated site:
|
|
279
|
+
[https://nih.ar](https://nih.ar)
|
|
280
|
+
|
|
281
|
+
View its source:
|
|
282
|
+
[https://gitlab.com/niharokz/nih.ar](https://gitlab.com/niharokz/nih.ar)
|
|
283
|
+
|
|
284
|
+
## Changelog
|
|
285
|
+
|
|
286
|
+
### v1.0.0 (April 2025) - Major Release
|
|
287
|
+
- **New CLI Commands**: Introduced `create`, `add`, `deploy`, `serve`, `config`, `test`, and `save` for a streamlined workflow.
|
|
288
|
+
- **Faster Page Generation**: Optimized Markdown processing and Jinja2 rendering for significantly reduced build times.
|
|
289
|
+
- **Cleaner Templates**: Simplified and modularized Jinja2 templates for easier customization.
|
|
290
|
+
- **Config Command**: Added `rynz config` to view/edit `config.yml`.
|
|
291
|
+
- **Test Command**: Added `rynz test` to validate project setup and structure.
|
|
292
|
+
- **Save Command**: Added `rynz save` to easily commit changes using Git.
|
|
293
|
+
- **Removed RSS Support**: Eliminated RSS feed generation and `rss_enabled` option for a leaner feature set.
|
|
294
|
+
- **Improved CLI**: Enhanced help output and error handling with `rich`.
|
|
295
|
+
- **Python Support**: Added compatibility for Python 3.11+.
|
|
296
|
+
- **Bug Fixes**: Resolved edge cases in frontmatter parsing and template rendering.
|
|
297
|
+
|
|
298
|
+
### v0.9.9 (Beta)
|
|
299
|
+
- Replaced `showInHome` with tag-based homepage visibility.
|
|
300
|
+
- Improved CLI error handling with color-coded output.
|
|
301
|
+
- Optimized build performance and modularity.
|
|
302
|
+
|
|
303
|
+
### v0.9.8 (Beta)
|
|
304
|
+
- Added custom port support for `serve`.
|
|
305
|
+
- Auto-handled `/abc` → `/abc.html` in dev server.
|
|
306
|
+
- Supported metadata injection via `meta` tag.
|
|
307
|
+
- Improved Windows compatibility.
|
|
308
|
+
|
|
309
|
+
See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
310
|
+
|
|
311
|
+
## Contributing
|
|
312
|
+
|
|
313
|
+
Contributions are welcome! To contribute:
|
|
314
|
+
|
|
315
|
+
1. Fork the repository.
|
|
316
|
+
2. Create a feature branch:
|
|
317
|
+
```bash
|
|
318
|
+
git checkout -b feature/my-feature
|
|
319
|
+
```
|
|
320
|
+
3. Commit changes:
|
|
321
|
+
```bash
|
|
322
|
+
git commit -m "Add my feature"
|
|
323
|
+
```
|
|
324
|
+
4. Push to the branch:
|
|
325
|
+
```bash
|
|
326
|
+
git push origin feature/my-feature
|
|
327
|
+
```
|
|
328
|
+
5. Open a pull request.
|
|
329
|
+
|
|
330
|
+
### Code Style
|
|
331
|
+
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) for Python.
|
|
332
|
+
- Run tests:
|
|
333
|
+
```bash
|
|
334
|
+
python -m unittest discover
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## License
|
|
338
|
+
|
|
339
|
+
Licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
340
|
+
|
|
341
|
+
## Contact
|
|
342
|
+
|
|
343
|
+
- **Maintainer**: Nihar (hi@nihars.com)
|
|
344
|
+
- **Repository**: [https://gitlab.com/niharokz/rynz](https://gitlab.com/niharokz/rynz)
|
|
345
|
+
- **Issues**: [https://gitlab.com/niharokz/rynz/-/issues](https://gitlab.com/niharokz/rynz/-/issues)
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
*Built with ❤️ using Python and Jinja2. Star the repo if Rynz sparks joy!*
|
rynz-1.0.0/README.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
|
|
2
|
+
# Rynz
|
|
3
|
+
|
|
4
|
+
🕊️ **Rynz: Really Your Note Zenerator**
|
|
5
|
+
Rynz is a lightweight, JavaScript-free static site generator crafted for developers who value Markdown, speed, and simplicity. Built with Python and Jinja2, it delivers fast, customizable static websites with an intuitive CLI, optimized page generation, and clean, minimal templates.
|
|
6
|
+
|
|
7
|
+
## Why Choose Rynz?
|
|
8
|
+
- **Blazing Fast**: Optimized page generation for rapid site builds.
|
|
9
|
+
- **No JavaScript**: Lightweight, clean HTML output by default.
|
|
10
|
+
- **Clean Templates**: Streamlined Jinja2 templates for easy customization.
|
|
11
|
+
- **Python-Powered**: Modular, forkable codebase for extensibility.
|
|
12
|
+
- **Markdown-First**: Effortless content creation with Markdown.
|
|
13
|
+
- **Open-Source**: Licensed under the [MIT License](#license).
|
|
14
|
+
|
|
15
|
+
## Table of Contents
|
|
16
|
+
- [Installation](#installation)
|
|
17
|
+
- [Usage](#usage)
|
|
18
|
+
- [Configuration](#configuration)
|
|
19
|
+
- [Folder Structure](#folder-structure)
|
|
20
|
+
- [Advanced Features](#advanced-features)
|
|
21
|
+
- [Example](#example)
|
|
22
|
+
- [Changelog](#changelog)
|
|
23
|
+
- [Contributing](#contributing)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
- [Contact](#contact)
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
Install Rynz via `pip` for the latest stable release:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install rynz
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or install the development version from GitLab:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install git+https://gitlab.com/niharokz/rynz
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Prerequisites
|
|
42
|
+
- Python 3.8 or higher
|
|
43
|
+
- `pip` for dependency management
|
|
44
|
+
|
|
45
|
+
### Dependencies
|
|
46
|
+
Rynz automatically installs:
|
|
47
|
+
- `pyyaml`: Parses `config.yml` and frontmatter.
|
|
48
|
+
- `jinja2`: Powers templating for HTML output.
|
|
49
|
+
- `markdown2`: Converts Markdown to HTML.
|
|
50
|
+
- `rich`: Enhances CLI with colorful output.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
Rynz provides a streamlined CLI for managing your static site. Run `rynz --help` for details.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
usage: rynz [-h] [-v] {create,add,deploy,serve,config,test,save} ...
|
|
58
|
+
|
|
59
|
+
🕊️ Rynz: Really Your Note Zenerator.
|
|
60
|
+
|
|
61
|
+
positional arguments:
|
|
62
|
+
{create,add,deploy,serve,config,test,save}
|
|
63
|
+
Available commands
|
|
64
|
+
create Create a new Rynz project.
|
|
65
|
+
add Create a new note or blog post.
|
|
66
|
+
deploy Convert Markdown files into static HTML
|
|
67
|
+
serve Serve your site locally at http://localhost:5555
|
|
68
|
+
config View or edit site configuration (config.yml)
|
|
69
|
+
test Test your Rynz setup and structure
|
|
70
|
+
save Save changes with Git (stage and commit)
|
|
71
|
+
|
|
72
|
+
options:
|
|
73
|
+
-h, --help show this help message and exit
|
|
74
|
+
-v, --version show program's version number and exit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 1. Create a New Project
|
|
78
|
+
Initialize a new project with the default structure:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
rynz create my-site
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Sets up `my-site/` with `config.yml`, templates, and content directories.
|
|
85
|
+
|
|
86
|
+
### 2. Add a New Note or Post
|
|
87
|
+
Create a new Markdown file:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
rynz add pageName
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Generates `content/note/pageName.md` with frontmatter.
|
|
94
|
+
|
|
95
|
+
### 3. Deploy the Site
|
|
96
|
+
Convert Markdown to static HTML, outputting to `public/`:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
rynz deploy
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 4. Serve Locally
|
|
103
|
+
Preview your site with a local server:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
rynz serve
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Access at [http://localhost:5555](http://localhost:5555). Use a custom port:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
rynz serve -p 8080
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 5. Manage Configuration
|
|
116
|
+
View or edit `config.yml`:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
rynz config
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Check `rynz config --help` for specific options.
|
|
123
|
+
|
|
124
|
+
### 6. Test Your Setup
|
|
125
|
+
Validate your project structure and configuration:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
rynz test
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Ensures no missing files or invalid frontmatter.
|
|
132
|
+
|
|
133
|
+
### 7. Save Changes with Git
|
|
134
|
+
Stage and commit changes:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
rynz save
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Or commit with a custom message:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
rynz save -m "Your commit message"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Configuration
|
|
147
|
+
|
|
148
|
+
Customize your site with `config.yml` in the project root. Example:
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
site_title: My Rynz Site
|
|
152
|
+
base_url: https://example.com
|
|
153
|
+
theme: default
|
|
154
|
+
favicon: resource/favicon.ico
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Access in templates with Jinja2:
|
|
158
|
+
|
|
159
|
+
```html
|
|
160
|
+
<link rel="icon" href="{{ config.get('favicon') }}">
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Folder Structure
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
my-site/
|
|
167
|
+
|-- public/ # Generated HTML output
|
|
168
|
+
|-- config.yml # Site configuration
|
|
169
|
+
|-- content/ # Markdown content
|
|
170
|
+
| |-- header.md # Header content
|
|
171
|
+
| |-- footer.md # Footer content
|
|
172
|
+
| |-- home.md # Homepage content
|
|
173
|
+
| `-- note/ # Individual pages/notes
|
|
174
|
+
| `-- sample.md
|
|
175
|
+
|-- resource/ # Static assets (CSS, images, etc.)
|
|
176
|
+
| `-- style.css
|
|
177
|
+
`-- templates/ # Jinja2 templates
|
|
178
|
+
|-- home_template.html # Homepage template
|
|
179
|
+
`-- note_template.html # Note/page template
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Folder Breakdown
|
|
183
|
+
- **`config.yml`**: Site-wide settings (title, theme, etc.).
|
|
184
|
+
- **`content/`**: Markdown files for pages and notes.
|
|
185
|
+
- **`resource/`**: Static assets (CSS, images, favicon).
|
|
186
|
+
- **`templates/`**: Jinja2 templates for HTML output.
|
|
187
|
+
- **`public/`**: Built site output.
|
|
188
|
+
|
|
189
|
+
## Advanced Features
|
|
190
|
+
|
|
191
|
+
### 1. Faster Page Generation
|
|
192
|
+
Rynz v1.0.0 optimizes rendering with streamlined Markdown processing and efficient Jinja2 templating, significantly reducing build times.
|
|
193
|
+
|
|
194
|
+
### 2. Cleaner Templates
|
|
195
|
+
Templates are now more modular and minimal, with simplified Jinja2 syntax for easier customization and maintenance.
|
|
196
|
+
|
|
197
|
+
### 3. Homepage Visibility via Tags
|
|
198
|
+
Control homepage visibility with tags. Add `home` to frontmatter:
|
|
199
|
+
|
|
200
|
+
```markdown
|
|
201
|
+
---
|
|
202
|
+
tags: [home]
|
|
203
|
+
---
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Filter in `home_template.html`:
|
|
207
|
+
|
|
208
|
+
```html
|
|
209
|
+
{% for page in pages if 'home' in page.tags %}
|
|
210
|
+
<a href="{{ page.url }}">{{ page.title }}</a>
|
|
211
|
+
{% endfor %}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### 4. Custom Metadata
|
|
215
|
+
Add per-page metadata:
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
meta: '<link rel="stylesheet" href="/extra.css">'
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Render in templates:
|
|
222
|
+
|
|
223
|
+
```html
|
|
224
|
+
{{ page.meta | safe }}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### 5. Extended Configuration
|
|
228
|
+
Add custom keys to `config.yml`:
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
analytics_id: UA-XXXXX-Y
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Use in templates:
|
|
235
|
+
|
|
236
|
+
```html
|
|
237
|
+
<script src="https://analytics.com/{{ config.get('analytics_id') }}"></script>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Example
|
|
241
|
+
|
|
242
|
+
Explore a live Rynz-generated site:
|
|
243
|
+
[https://nih.ar](https://nih.ar)
|
|
244
|
+
|
|
245
|
+
View its source:
|
|
246
|
+
[https://gitlab.com/niharokz/nih.ar](https://gitlab.com/niharokz/nih.ar)
|
|
247
|
+
|
|
248
|
+
## Changelog
|
|
249
|
+
|
|
250
|
+
### v1.0.0 (April 2025) - Major Release
|
|
251
|
+
- **New CLI Commands**: Introduced `create`, `add`, `deploy`, `serve`, `config`, `test`, and `save` for a streamlined workflow.
|
|
252
|
+
- **Faster Page Generation**: Optimized Markdown processing and Jinja2 rendering for significantly reduced build times.
|
|
253
|
+
- **Cleaner Templates**: Simplified and modularized Jinja2 templates for easier customization.
|
|
254
|
+
- **Config Command**: Added `rynz config` to view/edit `config.yml`.
|
|
255
|
+
- **Test Command**: Added `rynz test` to validate project setup and structure.
|
|
256
|
+
- **Save Command**: Added `rynz save` to easily commit changes using Git.
|
|
257
|
+
- **Removed RSS Support**: Eliminated RSS feed generation and `rss_enabled` option for a leaner feature set.
|
|
258
|
+
- **Improved CLI**: Enhanced help output and error handling with `rich`.
|
|
259
|
+
- **Python Support**: Added compatibility for Python 3.11+.
|
|
260
|
+
- **Bug Fixes**: Resolved edge cases in frontmatter parsing and template rendering.
|
|
261
|
+
|
|
262
|
+
### v0.9.9 (Beta)
|
|
263
|
+
- Replaced `showInHome` with tag-based homepage visibility.
|
|
264
|
+
- Improved CLI error handling with color-coded output.
|
|
265
|
+
- Optimized build performance and modularity.
|
|
266
|
+
|
|
267
|
+
### v0.9.8 (Beta)
|
|
268
|
+
- Added custom port support for `serve`.
|
|
269
|
+
- Auto-handled `/abc` → `/abc.html` in dev server.
|
|
270
|
+
- Supported metadata injection via `meta` tag.
|
|
271
|
+
- Improved Windows compatibility.
|
|
272
|
+
|
|
273
|
+
See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
274
|
+
|
|
275
|
+
## Contributing
|
|
276
|
+
|
|
277
|
+
Contributions are welcome! To contribute:
|
|
278
|
+
|
|
279
|
+
1. Fork the repository.
|
|
280
|
+
2. Create a feature branch:
|
|
281
|
+
```bash
|
|
282
|
+
git checkout -b feature/my-feature
|
|
283
|
+
```
|
|
284
|
+
3. Commit changes:
|
|
285
|
+
```bash
|
|
286
|
+
git commit -m "Add my feature"
|
|
287
|
+
```
|
|
288
|
+
4. Push to the branch:
|
|
289
|
+
```bash
|
|
290
|
+
git push origin feature/my-feature
|
|
291
|
+
```
|
|
292
|
+
5. Open a pull request.
|
|
293
|
+
|
|
294
|
+
### Code Style
|
|
295
|
+
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) for Python.
|
|
296
|
+
- Run tests:
|
|
297
|
+
```bash
|
|
298
|
+
python -m unittest discover
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## License
|
|
302
|
+
|
|
303
|
+
Licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
304
|
+
|
|
305
|
+
## Contact
|
|
306
|
+
|
|
307
|
+
- **Maintainer**: Nihar (hi@nihars.com)
|
|
308
|
+
- **Repository**: [https://gitlab.com/niharokz/rynz](https://gitlab.com/niharokz/rynz)
|
|
309
|
+
- **Issues**: [https://gitlab.com/niharokz/rynz/-/issues](https://gitlab.com/niharokz/rynz/-/issues)
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
*Built with ❤️ using Python and Jinja2. Star the repo if Rynz sparks joy!*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/python
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# ███╗ ██╗██╗██╗ ██╗ █████╗ ██████╗ ███████╗
|
|
5
|
+
# ████╗ ██║██║██║ ██║██╔══██╗██╔══██╗██╔════╝
|
|
6
|
+
# ██╔██╗ ██║██║███████║███████║██████╔╝███████╗
|
|
7
|
+
# ██║╚██╗██║██║██╔══██║██╔══██║██╔══██╗╚════██║
|
|
8
|
+
# ██║ ╚████║██║██║ ██║██║ ██║██║ ██║███████║
|
|
9
|
+
# ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
|
|
10
|
+
# DRAFTED BY [https://nih.ar] ON 14-04-2025
|
|
11
|
+
# SOURCE [__init__.py] LAST MODIFIED ON 28-04-2025.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
"""
|
|
15
|
+
Module for versioning of the rynz package.
|
|
16
|
+
|
|
17
|
+
This module defines the version number for the rynz static site generator
|
|
18
|
+
and provides a function to retrieve the current version.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
__version__ = "1.0.0"
|
|
22
|
+
|
|
23
|
+
def get_version():
|
|
24
|
+
"""Returns the current version of the rynz package."""
|
|
25
|
+
return __version__
|