@terrymooreii/sia 2.1.7 → 2.1.9

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/docs/README.md CHANGED
@@ -54,6 +54,7 @@ npm run build
54
54
  - **Tags & Categories** - Organize content with tags and auto-generated tag pages
55
55
  - **Pagination** - Built-in pagination for listing pages
56
56
  - **Image Support** - Automatic image copying and organization
57
+ - **Static Assets** - Support for favicons, fonts, and other static files
57
58
  - **Live Reload** - Development server with hot reloading
58
59
  - **Multiple Themes** - Built-in themes (main, minimal, developer, magazine) with light/dark mode
59
60
  - **Custom Theme Packages** - Create and share themes as npm packages (`sia-theme-*`)
@@ -70,6 +71,10 @@ my-site/
70
71
  │ ├── pages/ # Static pages
71
72
  │ ├── notes/ # Short notes/tweets
72
73
  │ └── images/ # Images
74
+ ├── assets/ # Static assets (optional)
75
+ ├── static/ # Static assets (optional)
76
+ ├── public/ # Static assets (optional)
77
+ ├── favicon.ico # Site favicon (optional)
73
78
  ├── _layouts/ # Custom layouts (optional)
74
79
  ├── _includes/ # Custom includes (optional)
75
80
  ├── styles/ # Custom CSS (optional)
@@ -118,6 +123,58 @@ server:
118
123
  showDrafts: false
119
124
  ```
120
125
 
126
+ ## Static Assets
127
+
128
+ Sia automatically copies static assets during the build process. You can place static files in any of these locations:
129
+
130
+ - **`assets/`** - Place files in `assets/` at the project root
131
+ - **`static/`** - Place files in `static/` at the project root
132
+ - **`public/`** - Place files in `public/` at the project root
133
+ - **Root directory** - Place `favicon.ico` directly in the project root
134
+
135
+ All files from these directories will be copied to the `dist/` folder during build, preserving their directory structure.
136
+
137
+ ### Supported File Types
138
+
139
+ Static assets include:
140
+ - **Favicons** - `.ico` files (favicon.ico can be in root or asset directories)
141
+ - **Fonts** - `.woff`, `.woff2`, `.ttf`, `.eot`
142
+ - **Documents** - `.pdf`, `.txt`, `.json`, `.xml`
143
+ - **Scripts** - `.js` files
144
+ - **Stylesheets** - `.css` files (though custom CSS is better placed in `styles/`)
145
+ - **Images** - All image formats (though images are better placed in `src/images/`)
146
+
147
+ ### Example Structure
148
+
149
+ ```
150
+ my-site/
151
+ ├── assets/
152
+ │ ├── favicon.ico
153
+ │ ├── robots.txt
154
+ │ ├── manifest.json
155
+ │ └── fonts/
156
+ │ └── custom-font.woff2
157
+ ├── static/
158
+ │ └── documents/
159
+ │ └── resume.pdf
160
+ └── favicon.ico # Also supported in root
161
+ ```
162
+
163
+ During build, these will be copied to:
164
+ ```
165
+ dist/
166
+ ├── assets/
167
+ │ ├── favicon.ico
168
+ │ ├── robots.txt
169
+ │ ├── manifest.json
170
+ │ └── fonts/
171
+ │ └── custom-font.woff2
172
+ ├── static/
173
+ │ └── documents/
174
+ │ └── resume.pdf
175
+ └── favicon.ico
176
+ ```
177
+
121
178
  ## CLI Commands
122
179
 
123
180
  | Command | Description |
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrymooreii/sia",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "A simple, powerful static site generator with markdown, front matter, and Nunjucks templates",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
package/readme.md CHANGED
@@ -1,3 +1,7 @@
1
+
2
+
3
+ ![Sia](./docs/imgs/logo-sia-t.png)
4
+
1
5
  # Sia
2
6
 
3
7
  A simple, powerful static site generator built with JavaScript. Similar to Eleventy/11ty, Sia supports markdown, front matter, Nunjucks templates, and more.
@@ -11,6 +15,7 @@ A simple, powerful static site generator built with JavaScript. Similar to Eleve
11
15
  - **Tags & Categories** - Organize content with tags, auto-generated tag pages
12
16
  - **Pagination** - Built-in pagination for listing pages
13
17
  - **Image Support** - Automatic image copying and organization
18
+ - **Static Assets** - Support for favicons, fonts, and other static files
14
19
  - **Live Reload** - Development server with hot reloading
15
20
  - **Themes** - Built-in themes (main, minimal, developer, magazine) with light/dark mode toggle
16
21
  - **Custom Themes** - Create and share themes as npm packages (`sia-theme-*`)
@@ -89,6 +94,10 @@ my-site/
89
94
  │ ├── pages/ # Static pages
90
95
  │ ├── notes/ # Short notes/tweets
91
96
  │ └── images/ # Images
97
+ ├── assets/ # Static assets (optional)
98
+ ├── static/ # Static assets (optional)
99
+ ├── public/ # Static assets (optional)
100
+ ├── favicon.ico # Site favicon (optional)
92
101
  ├── _layouts/ # Custom layouts (optional)
93
102
  ├── _includes/ # Custom includes (optional)
94
103
  ├── styles/ # Custom CSS (optional)
@@ -145,6 +154,58 @@ server:
145
154
 
146
155
  When `showDrafts` is set to `true`, draft posts (posts with `draft: true` in front matter) will be included in the development server build. This is useful for previewing draft content locally. Drafts are always excluded from production builds.
147
156
 
157
+ ## Static Assets
158
+
159
+ Sia automatically copies static assets during the build process. You can place static files in any of these locations:
160
+
161
+ - **`assets/`** - Place files in `assets/` at the project root
162
+ - **`static/`** - Place files in `static/` at the project root
163
+ - **`public/`** - Place files in `public/` at the project root
164
+ - **Root directory** - Place `favicon.ico` directly in the project root
165
+
166
+ All files from these directories will be copied to the `dist/` folder during build, preserving their directory structure.
167
+
168
+ ### Supported File Types
169
+
170
+ Static assets include:
171
+ - **Favicons** - `.ico` files (favicon.ico can be in root or asset directories)
172
+ - **Fonts** - `.woff`, `.woff2`, `.ttf`, `.eot`
173
+ - **Documents** - `.pdf`, `.txt`, `.json`, `.xml`
174
+ - **Scripts** - `.js` files
175
+ - **Stylesheets** - `.css` files (though custom CSS is better placed in `styles/`)
176
+ - **Images** - All image formats (though images are better placed in `src/images/`)
177
+
178
+ ### Example Structure
179
+
180
+ ```
181
+ my-site/
182
+ ├── assets/
183
+ │ ├── favicon.ico
184
+ │ ├── robots.txt
185
+ │ ├── manifest.json
186
+ │ └── fonts/
187
+ │ └── custom-font.woff2
188
+ ├── static/
189
+ │ └── documents/
190
+ │ └── resume.pdf
191
+ └── favicon.ico # Also supported in root
192
+ ```
193
+
194
+ During build, these will be copied to:
195
+ ```
196
+ dist/
197
+ ├── assets/
198
+ │ ├── favicon.ico
199
+ │ ├── robots.txt
200
+ │ ├── manifest.json
201
+ │ └── fonts/
202
+ │ └── custom-font.woff2
203
+ ├── static/
204
+ │ └── documents/
205
+ │ └── resume.pdf
206
+ └── favicon.ico
207
+ ```
208
+
148
209
  ## Front Matter
149
210
 
150
211
  Each markdown file can have YAML front matter:
@@ -23,7 +23,7 @@
23
23
  <a href="{{ post.url }}">{{ post.title }}</a>
24
24
  </h2>
25
25
 
26
- <p class="card-excerpt">{{ post.excerpt | excerpt(150) }}</p>
26
+ <p class="card-excerpt">{{ post.excerptHtml | safe }}</p>
27
27
 
28
28
  <div class="card-meta">
29
29
  <span class="card-date">{{ post.date | date('short') }}</span>
@@ -12,7 +12,7 @@
12
12
  <link>{{ site.url }}{{ post.url }}</link>
13
13
  <guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
14
14
  <pubDate>{{ post.date | date('rss') }}</pubDate>
15
- <description><![CDATA[{{ post.excerpt | excerpt(300) }}]]></description>
15
+ <description><![CDATA[{{ post.excerptHtml | safe }}]]></description>
16
16
  {% for tag in post.tags %}
17
17
  <category>{{ tag }}</category>
18
18
  {% endfor %}
@@ -16,7 +16,7 @@
16
16
  {{ note.date | date('full') }}
17
17
  </time>
18
18
  <div class="timeline-body">
19
- <div class="note-text">{{ note.excerpt | excerpt(200) }}</div>
19
+ <div class="note-text">{{ note.excerptHtml | safe }}</div>
20
20
  <a href="{{ note.url }}" class="read-more">Continue reading →</a>
21
21
  </div>
22
22
  {% if note.tags %}
@@ -12,8 +12,8 @@
12
12
 
13
13
  <h1 class="article-title">{{ page.title }}</h1>
14
14
 
15
- {% if page.excerpt %}
16
- <p class="article-subtitle">{{ page.excerpt | excerpt(200) }}</p>
15
+ {% if page.excerptHtml | safe %}
16
+ <p class="article-subtitle">{{ page.excerptHtml | safe }}</p>
17
17
  {% endif %}
18
18
 
19
19
  <div class="article-byline">
@@ -16,7 +16,7 @@
16
16
  <h2 class="row-title">
17
17
  <a href="{{ post.url }}">{{ post.title }}</a>
18
18
  </h2>
19
- <p class="row-excerpt">{{ post.excerpt | excerpt(180) }}</p>
19
+ <p class="row-excerpt">{{ post.excerptHtml | safe }}</p>
20
20
  <div class="row-meta">
21
21
  <span class="row-author">{{ post.author or site.author }}</span>
22
22
  <span class="meta-separator">·</span>
@@ -14,7 +14,7 @@
14
14
  <h2 class="featured-title">
15
15
  <a href="{{ featuredPost.url | url }}">{{ featuredPost.title }}</a>
16
16
  </h2>
17
- <p class="featured-excerpt">{{ featuredPost.excerpt | excerpt(200) }}</p>
17
+ <p class="featured-excerpt">{{ featuredPost.excerptHtml | safe }}</p>
18
18
  <div class="featured-meta">
19
19
  <span class="featured-author">{{ featuredPost.author or site.author }}</span>
20
20
  <span class="featured-date">{{ featuredPost.date | date('long') }}</span>
@@ -41,7 +41,7 @@
41
41
  <h3 class="card-title">
42
42
  <a href="{{ post.url | url }}">{{ post.title }}</a>
43
43
  </h3>
44
- <p class="card-excerpt">{{ post.excerpt | excerpt(100) }}</p>
44
+ <p class="card-excerpt">{{ post.excerptHtml | safe }}</p>
45
45
  <div class="card-meta">
46
46
  <time datetime="{{ post.date | date('iso') }}">{{ post.date | date('short') }}</time>
47
47
  <span>·</span>
@@ -64,7 +64,7 @@
64
64
  {% for note in collections.notes | limit(3) %}
65
65
  <article class="note-preview">
66
66
  <time datetime="{{ note.date | date('iso') }}">{{ note.date | date('short') }}</time>
67
- <p>{{ note.excerpt | excerpt(150) }}</p>
67
+ <p>{{ note.excerptHtml | safe }}</p>
68
68
  <a href="{{ note.url | url }}" class="note-link">Read note →</a>
69
69
  </article>
70
70
  {% endfor %}
@@ -13,7 +13,7 @@
13
13
  {{ note.date | date('full') }}
14
14
  </time>
15
15
  <div class="note-content">
16
- <p>{{ note.excerpt | excerpt(250) }}</p>
16
+ <p>{{ note.excerptHtml | safe }}</p>
17
17
  <a href="{{ note.url }}" class="note-read-more">Continue reading →</a>
18
18
  </div>
19
19
  {% if note.tags %}
@@ -24,7 +24,7 @@
24
24
  {% endfor %}
25
25
  </div>
26
26
  {% endif %}
27
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
27
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
28
28
  <a href="{{ post.url }}" class="post-card-link">Read more →</a>
29
29
  </article>
30
30
  {% else %}
@@ -26,7 +26,7 @@
26
26
  </span>
27
27
  {% endif %}
28
28
  </div>
29
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
29
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
30
30
  </article>
31
31
  {% else %}
32
32
  <p class="empty-message">No posts yet. Create your first post with <code>npx sia new post "My First Post"</code></p>
@@ -10,7 +10,7 @@
10
10
  {% for post in posts %}
11
11
  <article class="post-card">
12
12
  <h2 class="post-card-title">
13
- <a href="{{ post.url }}">{{ post.title or post.excerpt }}</a>
13
+ <a href="{{ post.url }}">{{ post.title or post.excerptHtml | safe }}</a>
14
14
  {% if post.draft %}<span class="draft-badge">Draft</span>{% endif %}
15
15
  </h2>
16
16
  <div class="post-card-meta">
@@ -26,8 +26,8 @@
26
26
  {% endfor %}
27
27
  </div>
28
28
  {% endif %}
29
- {% if post.excerpt %}
30
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
29
+ {% if post.excerptHtml %}
30
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
31
31
  {% endif %}
32
32
  </article>
33
33
  {% endfor %}
@@ -24,7 +24,7 @@
24
24
  {% endfor %}
25
25
  </div>
26
26
  {% endif %}
27
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
27
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
28
28
  <a href="{{ post.url }}" class="post-card-link">Read more →</a>
29
29
  </article>
30
30
  {% else %}
@@ -26,7 +26,7 @@
26
26
  </span>
27
27
  {% endif %}
28
28
  </div>
29
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
29
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
30
30
  </article>
31
31
  {% else %}
32
32
  <p class="empty-message">No posts yet. Create your first post with <code>npx sia new post "My First Post"</code></p>
@@ -10,7 +10,7 @@
10
10
  {% for post in posts %}
11
11
  <article class="post-card">
12
12
  <h2 class="post-card-title">
13
- <a href="{{ post.url }}">{{ post.title or post.excerpt }}</a>
13
+ <a href="{{ post.url }}">{{ post.title or post.excerptHtml | safe }}</a>
14
14
  {% if post.draft %}<span class="draft-badge">Draft</span>{% endif %}
15
15
  </h2>
16
16
  <div class="post-card-meta">
@@ -26,8 +26,8 @@
26
26
  {% endfor %}
27
27
  </div>
28
28
  {% endif %}
29
- {% if post.excerpt %}
30
- <p class="post-card-excerpt">{{ post.excerpt }}</p>
29
+ {% if post.excerptHtml %}
30
+ <p class="post-card-excerpt">{{ post.excerptHtml | safe }}</p>
31
31
  {% endif %}
32
32
  </article>
33
33
  {% endfor %}
@@ -20,7 +20,7 @@
20
20
  <ul class="tag-posts">
21
21
  {% for item in tag.items | limit(5) %}
22
22
  <li>
23
- <a href="{{ item.url }}">{{ item.title or item.excerpt }}</a>
23
+ <a href="{{ item.url }}">{{ item.title or item.excerptHtml | safe }}</a>
24
24
  <time datetime="{{ item.date | date('iso') }}">{{ item.date | date('short') }}</time>
25
25
  </li>
26
26
  {% endfor %}