You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix!: make markdown hard wraps configurable, default off
A single newline inside a paragraph rendered as <br>, so prose wrapped at a
fixed width came out ragged. It now renders as a space, per CommonMark. Set
markdown.hard_wraps: true to restore the old behavior; two trailing spaces or
a backslash still force a break.
Docs: merge Why Sarde into What Is Sarde and renumber the Start Here pages,
document hard_wraps in the configuration reference and Markdown basics, and
bring the README back in sync with the codebase.
Copy file name to clipboardExpand all lines: README.md
+72-34Lines changed: 72 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,14 @@
19
19
</p>
20
20
21
21
<palign="center">
22
-
A zero-config static site generator written in Go. Hugo's speed, Docusaurus's defaults, no config file needed.
22
+
A static site generator written in Go. Drop in Markdown, get a themed site. Conventions handle the structure, so the config file stays a few lines long.
23
23
</p>
24
24
25
25
## Why Sarde
26
26
27
-
Most static site generators make you choose: Hugo gives you speed and a single binary but demands configuration and template boilerplate. Docusaurus and Starlight give you great defaults for docs sites but require Node.js and a build toolchain.
27
+
Sarde is a single Go binary with no runtime dependencies, and your directory structure is the site structure. Put files in `content/blog/`and you get a date-sorted blog with RSS. A `content/docs/` directory produces sidebar navigation, versioning, and a table of contents. Both layouts are selected by directory name alone, without additional configuration.
28
28
29
-
Sarde gives you both. It ships as a single Go binary with no runtime dependencies. Your directory structure is your site structure. Put files in `content/blog/` and you get a date-sorted blog with RSS. Put files in `content/docs/` and you get a docs site with sidebar navigation, versioning, and table of contents. No config file needed for either.
30
-
31
-
When you do need control, everything is overridable through a single `sarde.yaml` file, CLI flags, or environment variables.
29
+
Defaults can be overridden through `sarde.yaml`, CLI flags, or environment variables.
32
30
33
31
<!-- TODO: Add a screenshot of a generated docs site here -->
34
32
<!-- <p align="center">
@@ -38,20 +36,21 @@ When you do need control, everything is overridable through a single `sarde.yaml
38
36
## Features
39
37
40
38
**Content**
41
-
- Auto-detected collections: directories named `blog`, `posts`, `articles`, `news` get date-sorted feed layouts; `docs`, `guides`, `courses`, `tutorials` get docs layouts with sidebar and ToC
39
+
- Auto-detected collections: directory names select date-sorted blogs, docs layouts with sidebar and ToC, lab guides, or slide decks (see the table under [Project structure](#project-structure))
42
40
- Frontmatter in YAML, TOML, or JSON
43
-
- Title, date, and weight inferred automatically from filenames, headings, and git history
41
+
- Title, date, and sidebar order inferred automatically from filenames, headings, and git history
44
42
- Page bundles (directory with `index.md` + images) with automatic responsive image generation
45
43
- Versioned docs (Docusaurus-style) with URL shadowing for the latest version
46
44
- i18n with per-language directories, RTL support, and translation fallback
45
+
- Optional `sidebar.yaml` for per-path sidebar overrides, tab overrides, and `collapse_level`
47
46
48
47
**Markdown**
49
-
-24+ Goldmark extensions: code blocks with syntax highlighting (Kazari + Nuri), KaTeX math, Mermaid diagrams, GitHub-style alerts, callouts, cards, tabs, file trees, image comparison, keyboard shortcuts, spoilers, and more
- Image processing: resize, crop, WebP conversion, LQIP blur-up placeholders (AVIF is available, but only in builds compiled with `-tags avif`; release binaries skip AVIF variants with a warning)
55
54
- Content-hash fingerprinting for cache busting
56
55
- HTML/CSS/JS minification
57
56
@@ -66,10 +65,25 @@ When you do need control, everything is overridable through a single `sarde.yaml
66
65
-`redirects` for redirect stubs (HTML or Netlify `_redirects`)
67
66
-`llms_txt` for LLM-friendly site index
68
67
68
+
**Client-side plugins** (11 available, all opt-in)
69
+
70
+
Add any of these to `plugins.enabled` to bundle its CSS and JS. Nothing ships to the browser unless it is listed, and each one is injected only on pages that need it.
- Install third-party plugins into `plugins/{slug}/` with `sarde plugin install`, from a zip, directory, URL, or GitHub repo
76
+
- Plugins are declarative (`plugin.yaml` manifest, assets, templates), so installing one never executes third-party code at build time
77
+
-`plugins.disabled` turns off any plugin, built-in or external, without replacing the whole `plugins.enabled` list
78
+
- Premium plugins are unlocked by an offline ed25519-signed license file (`sarde license install`). A missing or invalid license warns and skips the plugin; it never fails the build
79
+
- The plugin manifest and license file formats are provisional for 1.0 and may change in a 1.x release
80
+
69
81
**Developer experience**
70
82
- Dev server with WebSocket live reload and incremental rebuilds
71
83
- Link checking with terminal, JSON, and GitHub Actions annotation output
72
84
- Content validation without building (`sarde validate`)
These names are a convention, not a requirement. Any directory name works, and an unrecognized name becomes a generic collection. To get docs behavior under a different name, set it explicitly under `collections:` in `sarde.yaml` rather than renaming the directory.
173
+
153
174
## Configuration
154
175
155
176
All configuration goes in `sarde.yaml`. Every option has a sensible default; the file is entirely optional. Values are resolved in a 5-layer cascade (last wins):
@@ -208,31 +229,49 @@ i18n:
208
229
name: Français
209
230
210
231
plugins:
232
+
# Listing `enabled` replaces the default set, so name every plugin you want.
211
233
enabled:
212
234
- sitemap
213
235
- rss
214
236
- search
215
237
- seo
216
238
- link_validator
239
+
- scroll-to-top # client-side plugins are opt-in
240
+
# `disabled` turns off individual plugins without replacing the list above.
241
+
disabled:
242
+
- social_cards
217
243
```
218
244
219
245
See the [default configuration](embedded/defaults/sarde.yaml) for every available option and its default value.
220
246
221
247
## Commands
222
248
223
249
```bash
224
-
sarde build # Build for production
225
-
sarde dev # Dev server with live reload (port 4727)
226
-
sarde new site <path> # Scaffold a new project
227
-
sarde new course <name> # Create a course directory
228
-
sarde new lesson <course> <name> # Add an auto-numbered lesson
229
-
sarde check-links # Validate links without building
3.**Plugins**: four lifecycle hooks run in order: ConfigSetup (serial), ContentLoaded (serial), BeforeRender (serial per page), BuildDone (parallel)
247
286
248
287
The engine is designed around Go interfaces (`ContentDiscoverer`, `FrontmatterParser`, `MarkdownRenderer`, `TemplateEngine`) so each pipeline stage is independently testable.
249
288
@@ -272,7 +311,6 @@ On Windows, `build.bat` wraps these commands: `build.bat build`, `build.bat test
Copy file name to clipboardExpand all lines: docs/content/docs/extensions/markdown-basics.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ A paragraph is one or more consecutive lines of text, separated by one or more b
28
28
29
29
Here is a second paragraph. Notice how a blank line separates them. Paragraphs can span multiple lines in the source and still render as a single block of text.
30
30
31
+
That last point matters when wrapping prose at a fixed width: a single newline inside a paragraph is a soft break and renders as a space, so the text reflows to the reader's screen width. Only a blank line starts a new paragraph.
32
+
33
+
To force a line break inside a paragraph, end the line with two spaces or a backslash:
34
+
35
+
```markdown
36
+
First line
37
+
second line, on its own row.
38
+
```
39
+
40
+
To make every newline break the line instead, set [`markdown.hard_wraps`](/reference/configuration#markdown) to `true`.
| `hard_wraps` | bool | `false` | Render every single newline inside a paragraph as a line break. Off by default, so prose wrapped in the source reflows as one paragraph. Explicit breaks (two trailing spaces, or a trailing backslash) work either way. |
Copy file name to clipboardExpand all lines: docs/content/docs/start-here/_index.md
+5-17Lines changed: 5 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,14 @@ sidebar:
8
8
open: "true"
9
9
---
10
10
11
-
New to Sarde? Start with these pages to understand what it is, get it
12
-
running, and deploy a site.
11
+
New to Sarde? Start with these pages to understand what it is, get it running, and deploy a site.
13
12
14
13
## Orientation
15
14
16
-
-[What Is Sarde](/start-here/what-is-sarde/) explains what Sarde does
17
-
and what kind of sites it builds.
18
-
-[Why Sarde](/start-here/why-sarde/) covers the value proposition and
19
-
tradeoffs compared to other tools.
20
-
-[Core Concepts](/start-here/core-concepts/) introduces the mental model:
21
-
content, configuration, themes, and collections.
15
+
-[What Is Sarde](/start-here/what-is-sarde/) explains what Sarde does, what a build produces, which kinds of sites it suits, and the tradeoffs that come with it.
16
+
-[Core Concepts](/start-here/core-concepts/) introduces the mental model: content and URLs, frontmatter, collections, configuration, and themes.
22
17
23
18
## Hands-on
24
19
25
-
-[Getting Started](/start-here/getting-started/) walks through installation,
26
-
scaffolding a site, and previewing it locally.
27
-
-[Deploying](/start-here/deploying/) covers production builds and deployment
28
-
to GitHub Pages, Netlify, Cloudflare Pages, and Vercel.
29
-
30
-
## Desktop
31
-
32
-
-[Oi Desktop Quickstart](/start-here/oi-desktop-quickstart/) introduces the
33
-
visual editor for creating and previewing Sarde content.
20
+
-[Getting Started](/start-here/getting-started/) walks through installation, scaffolding a site, and previewing it locally.
21
+
-[Deploying](/start-here/deploying/) covers production builds and deployment to GitHub Pages, Netlify, Cloudflare Pages, and Vercel.
0 commit comments