feat(nvim): add automatic tagging for draft content
This commit is contained in:
parent
dba190a71e
commit
7624d54f51
2 changed files with 77 additions and 35 deletions
|
|
@ -13,6 +13,8 @@ calls the existing Bun scripts.
|
|||
`~/Development/MyWeb/magnum-opus/main`.
|
||||
- `direnv` is installed and the website `.envrc` is allowed.
|
||||
- The website development shell provides Bun.
|
||||
- `TYPESAFE_API_KEY` or `TYPESAFEAI_API_KEY` is available for tag classification.
|
||||
- `OPENROUTER_API_KEY`, `OPENAI_API_KEY`, or `TAG_GENERATOR_API_KEY` is available when a new tag must be created.
|
||||
|
||||
Set `RASYIDANAF_SITE_ROOT` before starting Neovim to use another checkout:
|
||||
|
||||
|
|
@ -26,9 +28,10 @@ The Notes group uses the local leader (`\`).
|
|||
|
||||
| Command | Mapping | Action |
|
||||
| --- | --- | --- |
|
||||
| `:NotesNewLog` | `\nl` | Prompt for an optional title and tags, create a Log draft, and open it |
|
||||
| `:NotesNewNote` | `\nn` | Prompt for a required title and optional tags, create a Note draft, and open it |
|
||||
| `:NotesNewLog` | `\nl` | Prompt for an optional title, create an untagged Log draft, and open it |
|
||||
| `:NotesNewNote` | `\nn` | Prompt for a required title, create an untagged Note draft, and open it |
|
||||
| `:NotesPublish` | `\np` | Save and publish the current Entry after confirmation |
|
||||
| `:ContentAutoTag` | `\nt` | Save and automatically tag the current Draft Note or Blog Post |
|
||||
| `:NotesValidate` | `\nv` | Validate public Notes metadata, routes, lifecycle, tags, and media |
|
||||
| `:NotesBuild` | `\nb` | Run the complete production build |
|
||||
|
||||
|
|
@ -36,13 +39,19 @@ The Notes group uses the local leader (`\`).
|
|||
does not commit, push, or deploy. Review the Jujutsu diff and push the website
|
||||
repository separately.
|
||||
|
||||
`ContentAutoTag` accepts Drafts in `vault/public-notes/` and `vault/blog/`.
|
||||
TypeSafe selects and validates tags. The command reuses tags collected from both
|
||||
content areas. If no existing tag fits, an OpenAI-compatible generator proposes
|
||||
new tags and TypeSafe validates them before the command updates frontmatter.
|
||||
|
||||
## Normal workflow
|
||||
|
||||
1. Press `\nl` for a Log or `\nn` for a titled Note.
|
||||
2. Write and save the Entry.
|
||||
3. Press `\np` and confirm publication.
|
||||
4. Press `\nv`, then `\nb`.
|
||||
5. Review, describe, and push the website change with Jujutsu.
|
||||
3. Press `\nt` to generate tags and review the notification.
|
||||
4. Press `\np` and confirm publication.
|
||||
5. Press `\nv`, then `\nb`.
|
||||
6. Review, describe, and push the website change with Jujutsu.
|
||||
|
||||
The publication command reloads the current buffer after the repository script
|
||||
writes `publishedAt` and processes referenced images.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue