Configuration

Configure NUCH to fit your project structure.

Setting up your config file

Make sure you have a valid config file set up. You can create a sample config by running:

nuch --config

This will put a default configuration file in your XDG config directory (usually ~/.config/nuch/config.toml).

Example config file

config.toml
[working]
files = "Documents/writings"
images = "Documents/writings/images"

[[collection]]
name = "writing"
files = "your-site/content"
images = "your-site/public/images"

[[collection]]
name = "blogs"
files = "your-site/content/blogs"
# images omitted — optional

Understanding the config file

IMPORTANT
All paths are relative to your home directory.

Make sure to adjust the paths according to your project structure.

The working directories specified in the config file must contain valid Markdown files or images.

Explaining the fields

working

Points to where your unpublished files are located.

files

Points to the directory where your unpublished Markdown files are located.

example: Documents/writings

images

Points to the directory where your unpublished images that are used in the post are located.

example: Documents/writings/images

collection

You should define each collection corresponing to the content collections defined in your content.config.ts file. Each collection must have a unique name.

name

The name of the collection as defined in your content.config.ts file.

example: content or blogs

files

Points to the directory that you defined as the content's collection in your content.config.ts file.

example: your-site/content or your-site/content/blog

images

Points to the directory where your images will be copied when publishing the post. This directory must be inside the public/ directory of your site.

example: your-site/public/images or your-site/public/blog-images

NOTE
The images field is optional. If omitted, NUCH will not copy any images when publishing.