LCG Writing Assistant
unlistedby Ink-kai
Slash menu and front matter helpers for writing Hugo/FixIt posts.
LCG Writing Assistant
LCG Writing Assistant is a free, open-source Obsidian plugin for Hugo/FixIt writers who publish from Obsidian.
Stop memorizing front matter field names. Stop fixing YAML errors. Stop manually uploading images.
This plugin helps you insert front matter templates, edit fields visually, understand what each field means, and upload images to Cloudflare R2 or WebDAV — all without leaving Obsidian.
Why Hugo Writers Need This
- No more guessing field names — Type
/lcgand select what you need - No more YAML errors — Visual editor prevents syntax mistakes
- No more path hunting — Images upload automatically and paths are inserted
- No more docs翻来翻去 — Field descriptions explain what each field does
Works with Hugo, FixIt, LoveIt, PaperMod, and any Hugo theme.
Features
- Type
/lcgin a Markdown editor to open the LCG writing menu. - Insert a configurable Hugo/FixIt front matter template.
- Edit front matter through Front matter 编辑.
- Browse grouped front matter field descriptions with Chinese labels.
- Validate the current note for required fields, date format, draft state, array fields, and old compatibility fields.
- Use the editor right-click LCG 写作助手 entry.
- Paste image files into Markdown and upload them when CDN upload is enabled.
- Select or paste images in image fields and upload them to Cloudflare R2 or WebDAV.
- Leave image paste fully under Obsidian's default attachment workflow when CDN upload is disabled.
- Test CDN upload, public URL access, and cleanup from settings.
Commands
插入 front matter打开 front matter 编辑校验当前文章插入 LCG 字段:...
Command names are shown in Chinese because the plugin is currently focused on Hugo/FixIt writers using Chinese field guidance.
Settings
- 基础: configure the
/lcgtrigger phrase, auto-create front matter, and show advanced fields such asauthor,password,repost, and_build. - 图片上传: configure optional CDN upload, public base URL, path prefix, and Cloudflare R2 or WebDAV credentials.
- 字段说明: browse grouped field reference cards and choose which fields are included in the default template.
- Paste Cloudflare R2 credentials and parse them into settings without saving the original pasted text.
- Test CDN upload, public URL access, and cleanup from settings.
Installation
From Obsidian community plugins
After the plugin is accepted into the community plugin directory:
- Open Settings → Community plugins.
- Select Browse.
- Search for LCG Writing Assistant.
- Select Install.
- Enable the plugin.
Manual install
- Download
main.js,manifest.json, andstyles.cssfrom a GitHub release. - Create this folder in your vault:
<Vault>/.obsidian/plugins/lcg-writing-assistant/
- Copy the downloaded files into that folder.
- Reload Obsidian.
- Enable the plugin in Settings → Community plugins.
Usage
Slash menu
In a Markdown note, type /lcg and select a writing action, such as inserting the template, opening Front matter 编辑, validating the note, or inserting a specific field.
Right-click menu
Right-click in a Markdown editor and open LCG 写作助手.
Front matter editor
Use the command palette, /lcg, or the editor right-click menu to open Front matter 编辑 and fill fields by category. Only fields with values are written. Empty fields are ignored.
Array fields, such as categories and tags, use tag-style input. Type a value and press Enter or comma to add it.
Image fields accept:
- A direct URL typed into the field.
- A local image selected with the field's 选择 button.
- An image pasted into the field with Ctrl+V.
If CDN upload is enabled and configured, selected or pasted image files are uploaded and the resulting URL is filled into the field.
Examples
Example 1: Insert front matter template
- Create a new note in Obsidian
- Type
/lcgin the editor - Select 插入 front matter
- The plugin inserts a template like:
--- title: "" date: 2026-05-16 tags: [] categories: [] --- - Fill in the fields using the visual editor
Example 2: Validate a post before publishing
- Write your Hugo post with front matter
- Type
/lcgand select 校验当前文章 - The plugin checks for:
- Required fields (title, date)
- Valid date format (ISO 8601)
- Draft status
- Array field format
- Shows a notice with validation results
Example 3: Upload images automatically
- Enable CDN upload in settings (Cloudflare R2 or WebDAV)
- Paste an image into your Markdown note
- The plugin automatically uploads the image and replaces the local path with the CDN URL
- Your Hugo site displays the image from the CDN
CDN Upload
CDN upload is off by default.
When CDN upload is disabled, this plugin does not intercept normal Obsidian image paste behavior. Obsidian handles attachments as usual.
When CDN upload is enabled, the plugin can upload image files to:
- Cloudflare R2
- WebDAV
The plugin stores provider settings in Obsidian plugin data. These settings may include:
- CDN public base URL
- path prefix
- Cloudflare R2 account ID, bucket, access key ID, and secret access key
- WebDAV endpoint, username, and password
Cloudflare cfat_... tokens pasted into settings are parsed and are not saved as the original token string.
Quick Setup: Cloudflare R2
- Create a Cloudflare account if you don't have one
- Create an R2 bucket in Cloudflare dashboard → R2 → Create bucket
- Create an API token: R2 → Settings → Tokens → Create API token
- Select "Edit" template or create custom with
Object Read+Object Writepermissions
- Select "Edit" template or create custom with
- Copy these values:
- Account ID (from R2 overview page)
- Bucket name
- Access Key ID
- Secret Access Key
- Configure in plugin settings:
- Enable CDN upload
- Enter your R2 credentials
- Set public URL (e.g.,
https://your-domain.com) - Click "Test" to verify
Quick Setup: WebDAV
- Use any WebDAV server (Nextcloud, Synology NAS, Linux server with Apache/Nginx)
- Get your WebDAV URL, e.g.,
https://your-server.com/remote.php/dav/files/username/ - Create credentials in your WebDAV service
- Configure in plugin settings:
- Enable CDN upload
- Select WebDAV provider
- Enter endpoint, username, and password
- Set public URL (your WebDAV server's public URL)
- Click "Test" to verify
Privacy and Network Use
This plugin does not collect telemetry.
This plugin does not upload vault content to any server controlled by the plugin author.
Network requests are made only for user-triggered CDN features:
- Cloudflare token verification when parsing pasted R2 credentials.
- Cloudflare R2 upload, delete, and upload test requests.
- WebDAV upload, delete, directory creation, and upload test requests.
- Public URL GET checks when running the CDN test button.
Image file data is sent only to the CDN/WebDAV endpoint configured by the user.
Credentials are stored locally in Obsidian plugin data. Anyone with access to your vault configuration files may be able to read them.
Support
This plugin is free and open source. If you find it useful, consider supporting its development.
Development
npm install
npm run dev
npm run build
npm run lint
Production build outputs main.js at the plugin root.
Release Checklist
Before publishing a GitHub release:
- Update
versioninpackage.jsonandmanifest.json. - Update
versions.jsonwhenminAppVersionchanges. - Run
npm run build. - Run
npm run lint. - Attach these files to the GitHub release:
manifest.jsonmain.jsstyles.css
The GitHub release tag must exactly match the version in manifest.json, without a leading v.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.