@terrymooreii/sia 2.1.10 → 2.1.13
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.
- package/lib/assets.js +23 -21
- package/package.json +1 -1
- package/themes/main/includes/header.njk +2 -0
- package/themes/minimal/includes/header.njk +2 -0
- package/_config.yml +0 -37
- package/src/images/.gitkeep +0 -3
- package/src/notes/2024-12-17-first-note.md +0 -6
- package/src/pages/about.md +0 -29
- package/src/posts/2024-12-16-markdown-features.md +0 -76
- package/src/posts/2024-12-17-welcome-to-sia.md +0 -78
- package/src/posts/2024-12-17-welcome-to-static-forge.md +0 -78
package/lib/assets.js
CHANGED
|
@@ -134,39 +134,41 @@ function hasCssFiles(dir) {
|
|
|
134
134
|
export function copyDefaultStyles(config, resolvedTheme = null) {
|
|
135
135
|
const outputStylesDir = join(config.outputDir, 'styles');
|
|
136
136
|
|
|
137
|
-
//
|
|
138
|
-
const userStylesDir = join(config.rootDir, 'styles');
|
|
139
|
-
|
|
140
|
-
if (hasCssFiles(userStylesDir)) {
|
|
141
|
-
// Copy user styles
|
|
142
|
-
const copied = copyAssets(userStylesDir, outputStylesDir);
|
|
143
|
-
console.log(`🎨 Copied ${copied.length} custom style files`);
|
|
144
|
-
return copied;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Resolve theme if not already resolved
|
|
137
|
+
// Always copy theme styles first
|
|
148
138
|
const themeName = config.theme?.name || 'main';
|
|
149
139
|
const theme = resolvedTheme || resolveTheme(themeName, config.rootDir);
|
|
150
140
|
const themeStylesDir = join(theme.themeDir, 'styles');
|
|
151
141
|
|
|
142
|
+
let themeCopied = [];
|
|
152
143
|
if (existsSync(themeStylesDir)) {
|
|
153
|
-
|
|
144
|
+
themeCopied = copyAssets(themeStylesDir, outputStylesDir);
|
|
154
145
|
if (!theme.isExternal) {
|
|
155
146
|
console.log(`🎨 Using "${theme.themeName}" theme`);
|
|
156
147
|
}
|
|
157
|
-
|
|
148
|
+
} else {
|
|
149
|
+
// Fallback to main theme if theme styles not found
|
|
150
|
+
const fallbackStylesDir = join(getBuiltInThemesDir(), 'main', 'styles');
|
|
151
|
+
if (existsSync(fallbackStylesDir)) {
|
|
152
|
+
console.log(`⚠️ Theme "${themeName}" styles not found, using "main" theme styles`);
|
|
153
|
+
themeCopied = copyAssets(fallbackStylesDir, outputStylesDir);
|
|
154
|
+
}
|
|
158
155
|
}
|
|
159
156
|
|
|
160
|
-
//
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
157
|
+
// Then copy user custom styles (can override theme styles)
|
|
158
|
+
const userStylesDir = join(config.rootDir, 'styles');
|
|
159
|
+
let userCopied = [];
|
|
160
|
+
|
|
161
|
+
if (hasCssFiles(userStylesDir)) {
|
|
162
|
+
userCopied = copyAssets(userStylesDir, outputStylesDir);
|
|
163
|
+
console.log(`🎨 Copied ${userCopied.length} custom style file(s)`);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const totalCopied = themeCopied.length + userCopied.length;
|
|
167
|
+
if (totalCopied === 0) {
|
|
168
|
+
console.log('⚠️ No styles found');
|
|
166
169
|
}
|
|
167
170
|
|
|
168
|
-
|
|
169
|
-
return [];
|
|
171
|
+
return [...themeCopied, ...userCopied];
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
/**
|
package/package.json
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
<a href="{{ '/tags/' | url }}" class="nav-link{% if page.url and page.url.startsWith('/tags') %} active{% endif %}">Tags</a>
|
|
10
10
|
{% if collections.pages %}
|
|
11
11
|
{% for p in collections.pages | limit(3) %}
|
|
12
|
+
{% if not p.hideFromHeader %}
|
|
12
13
|
<a href="{{ p.url }}" class="nav-link{% if page.url == p.url %} active{% endif %}">{{ p.title }}</a>
|
|
14
|
+
{% endif %}
|
|
13
15
|
{% endfor %}
|
|
14
16
|
{% endif %}
|
|
15
17
|
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
<a href="{{ '/tags/' | url }}" class="nav-link{% if page.url and page.url.startsWith('/tags') %} active{% endif %}">Tags</a>
|
|
10
10
|
{% if collections.pages %}
|
|
11
11
|
{% for p in collections.pages | limit(3) %}
|
|
12
|
+
{% if not p.hideFromHeader %}
|
|
12
13
|
<a href="{{ p.url }}" class="nav-link{% if page.url == p.url %} active{% endif %}">{{ p.title }}</a>
|
|
14
|
+
{% endif %}
|
|
13
15
|
{% endfor %}
|
|
14
16
|
{% endif %}
|
|
15
17
|
|
package/_config.yml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
site:
|
|
2
|
-
title: "Terry Moore II"
|
|
3
|
-
description: "A personal blog built with Sia"
|
|
4
|
-
url: "http://localhost:3000"
|
|
5
|
-
author: "Terry Moore II"
|
|
6
|
-
|
|
7
|
-
theme:
|
|
8
|
-
name: main
|
|
9
|
-
showHero: true
|
|
10
|
-
|
|
11
|
-
input: src
|
|
12
|
-
output: dist
|
|
13
|
-
|
|
14
|
-
collections:
|
|
15
|
-
posts:
|
|
16
|
-
path: posts
|
|
17
|
-
layout: post
|
|
18
|
-
permalink: /blog/:slug/
|
|
19
|
-
sortBy: date
|
|
20
|
-
sortOrder: desc
|
|
21
|
-
pages:
|
|
22
|
-
path: pages
|
|
23
|
-
layout: page
|
|
24
|
-
permalink: /:slug/
|
|
25
|
-
notes:
|
|
26
|
-
path: notes
|
|
27
|
-
layout: note
|
|
28
|
-
permalink: /notes/:slug/
|
|
29
|
-
sortBy: date
|
|
30
|
-
sortOrder: desc
|
|
31
|
-
|
|
32
|
-
pagination:
|
|
33
|
-
size: 10
|
|
34
|
-
|
|
35
|
-
server:
|
|
36
|
-
port: 3000
|
|
37
|
-
showDrafts: false # Set to true to show draft posts in dev server
|
package/src/images/.gitkeep
DELETED
package/src/pages/about.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "About"
|
|
3
|
-
layout: page
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## About This Site
|
|
7
|
-
|
|
8
|
-
This site is built with **Sia**, a simple and powerful static site generator.
|
|
9
|
-
|
|
10
|
-
### About Me
|
|
11
|
-
|
|
12
|
-
Hello! I'm the author of this blog. Feel free to customize this page with your own information.
|
|
13
|
-
|
|
14
|
-
### Contact
|
|
15
|
-
|
|
16
|
-
You can reach me at:
|
|
17
|
-
|
|
18
|
-
- Email: your.email@example.com
|
|
19
|
-
- Twitter: @yourhandle
|
|
20
|
-
- GitHub: @yourusername
|
|
21
|
-
|
|
22
|
-
### Colophon
|
|
23
|
-
|
|
24
|
-
This site is:
|
|
25
|
-
|
|
26
|
-
- Generated with [Sia](https://github.com/terrymooreii/sia)
|
|
27
|
-
- Written in Markdown
|
|
28
|
-
- Styled with CSS
|
|
29
|
-
- Hosted on [your hosting provider]
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Markdown Features Guide"
|
|
3
|
-
date: 2024-12-16
|
|
4
|
-
tags: [markdown, tutorial]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This post demonstrates the markdown features supported by Static Forge.
|
|
8
|
-
|
|
9
|
-
## Headers
|
|
10
|
-
|
|
11
|
-
Use `#` for headers. The more `#` symbols, the smaller the header.
|
|
12
|
-
|
|
13
|
-
## Text Formatting
|
|
14
|
-
|
|
15
|
-
You can make text **bold**, *italic*, or ***both***. You can also use ~~strikethrough~~.
|
|
16
|
-
|
|
17
|
-
## Links and Images
|
|
18
|
-
|
|
19
|
-
[This is a link](https://example.com) and here's how to add images:
|
|
20
|
-
|
|
21
|
-
```markdown
|
|
22
|
-

|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Lists
|
|
26
|
-
|
|
27
|
-
### Unordered Lists
|
|
28
|
-
|
|
29
|
-
- First item
|
|
30
|
-
- Second item
|
|
31
|
-
- Nested item
|
|
32
|
-
- Another nested item
|
|
33
|
-
- Third item
|
|
34
|
-
|
|
35
|
-
### Ordered Lists
|
|
36
|
-
|
|
37
|
-
1. First step
|
|
38
|
-
2. Second step
|
|
39
|
-
3. Third step
|
|
40
|
-
|
|
41
|
-
## Blockquotes
|
|
42
|
-
|
|
43
|
-
> "The best way to predict the future is to create it."
|
|
44
|
-
> — Peter Drucker
|
|
45
|
-
|
|
46
|
-
## Code
|
|
47
|
-
|
|
48
|
-
Inline `code` looks like this.
|
|
49
|
-
|
|
50
|
-
Code blocks with syntax highlighting:
|
|
51
|
-
|
|
52
|
-
```javascript
|
|
53
|
-
function greet(name) {
|
|
54
|
-
return `Hello, ${name}!`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
console.log(greet('World'));
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Tables
|
|
61
|
-
|
|
62
|
-
| Feature | Supported |
|
|
63
|
-
|---------|-----------|
|
|
64
|
-
| Markdown | ✅ |
|
|
65
|
-
| Front Matter | ✅ |
|
|
66
|
-
| Tags | ✅ |
|
|
67
|
-
| Pagination | ✅ |
|
|
68
|
-
|
|
69
|
-
## Horizontal Rule
|
|
70
|
-
|
|
71
|
-
Use `---` for a horizontal rule:
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
That's it! Enjoy writing in markdown.
|
|
76
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Welcome to Sia"
|
|
3
|
-
date: 2024-12-17
|
|
4
|
-
tags: [getting-started, sia]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Welcome to your new blog powered by **Sia**! This is a sample post to help you get started.
|
|
8
|
-
|
|
9
|
-
## What is Sia?
|
|
10
|
-
|
|
11
|
-
Sia is a simple, powerful static site generator that supports:
|
|
12
|
-
|
|
13
|
-
- **Markdown** with front matter for easy content creation
|
|
14
|
-
- **Nunjucks templates** for flexible layouts
|
|
15
|
-
- **Tags** for organizing your content
|
|
16
|
-
- **Pagination** for listing pages
|
|
17
|
-
- **Live reload** during development
|
|
18
|
-
- **Clean, light theme** out of the box
|
|
19
|
-
|
|
20
|
-
## Getting Started
|
|
21
|
-
|
|
22
|
-
### Creating Content
|
|
23
|
-
|
|
24
|
-
To create a new blog post:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npx sia new post "My New Post"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
To create a new page:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npx sia new page "About Me"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
To create a short note (like a tweet):
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx sia new note "Just discovered something cool!"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Running the Development Server
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm run dev
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
This will start a local server with live reload at `http://localhost:3000`.
|
|
49
|
-
|
|
50
|
-
### Building for Production
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
npm run build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This will generate your static site in the `dist` folder, ready to deploy!
|
|
57
|
-
|
|
58
|
-
## Front Matter
|
|
59
|
-
|
|
60
|
-
Each markdown file can have front matter at the top:
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
---
|
|
64
|
-
title: "My Post Title"
|
|
65
|
-
date: 2024-12-17
|
|
66
|
-
tags: [tag1, tag2]
|
|
67
|
-
draft: true # Set to true to hide from production
|
|
68
|
-
---
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Customization
|
|
72
|
-
|
|
73
|
-
- Edit `_config.yml` to change site settings
|
|
74
|
-
- Add custom layouts in `_layouts/`
|
|
75
|
-
- Add custom includes in `_includes/`
|
|
76
|
-
- Override default styles by adding `styles/main.css`
|
|
77
|
-
|
|
78
|
-
Happy blogging! 🚀
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Welcome to Sia"
|
|
3
|
-
date: 2024-12-17
|
|
4
|
-
tags: [getting-started, sia]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Welcome to your new blog powered by **Sia**! This is a sample post to help you get started.
|
|
8
|
-
|
|
9
|
-
## What is Sia?
|
|
10
|
-
|
|
11
|
-
Sia is a simple, powerful static site generator that supports:
|
|
12
|
-
|
|
13
|
-
- **Markdown** with front matter for easy content creation
|
|
14
|
-
- **Nunjucks templates** for flexible layouts
|
|
15
|
-
- **Tags** for organizing your content
|
|
16
|
-
- **Pagination** for listing pages
|
|
17
|
-
- **Live reload** during development
|
|
18
|
-
- **Clean, light theme** out of the box
|
|
19
|
-
|
|
20
|
-
## Getting Started
|
|
21
|
-
|
|
22
|
-
### Creating Content
|
|
23
|
-
|
|
24
|
-
To create a new blog post:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npx sia new post "My New Post"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
To create a new page:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npx sia new page "About Me"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
To create a short note (like a tweet):
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx sia new note "Just discovered something cool!"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Running the Development Server
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm run dev
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
This will start a local server with live reload at `http://localhost:3000`.
|
|
49
|
-
|
|
50
|
-
### Building for Production
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
npm run build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This will generate your static site in the `dist` folder, ready to deploy!
|
|
57
|
-
|
|
58
|
-
## Front Matter
|
|
59
|
-
|
|
60
|
-
Each markdown file can have front matter at the top:
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
---
|
|
64
|
-
title: "My Post Title"
|
|
65
|
-
date: 2024-12-17
|
|
66
|
-
tags: [tag1, tag2]
|
|
67
|
-
draft: true # Set to true to hide from production
|
|
68
|
-
---
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Customization
|
|
72
|
-
|
|
73
|
-
- Edit `_config.yml` to change site settings
|
|
74
|
-
- Add custom layouts in `_layouts/`
|
|
75
|
-
- Add custom includes in `_includes/`
|
|
76
|
-
- Override default styles by adding `styles/main.css`
|
|
77
|
-
|
|
78
|
-
Happy blogging! 🚀
|