Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ slug: optional-manual-slug
```

Only `status: published` files are synced; drafts, stubs, and missing statuses are
skipped. The sync command writes generated Markdown to `src/content/writing/` and
skipped. Files and directories whose names start with `_` are ignored entirely, so
vault-side templates, notes, and publishing process folders can live beside article
sources. The sync command writes generated Markdown to `src/content/writing/` and
tracks stable source-to-slug mappings in `src/content/writing/.sync-manifest.json`.

```sh
Expand Down
3 changes: 3 additions & 0 deletions scripts/sync-writing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ async function listMarkdownFiles(dir: string): Promise<string[]> {
const entries = await readdir(dir, { withFileTypes: true });
const files = await Promise.all(
entries.map(async (entry) => {
if (entry.name.startsWith('_')) {
return [];
}
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
return listMarkdownFiles(fullPath);
Expand Down