Version 2 (modified by 2 months ago) ( diff ) | ,
---|
Creating texts and publishing
New
To create new text files, use txt new
.
For example:
$ txt new "お会いできてうれしいです"
It's important to enclose the title with quotation marks if it contains spaces (or just for clarity).
The command will return the filename of the new text, which contains its ID.
Use your favourite text editor to open it.
Text files will be stored in either:
- The directory pointed at by
$TXTDIR
if defined $HOME/.local/share/texts
, if directory exists- The current working directory, if all else fails
The simplest approach is to put all texts in the $HOME/.local/share/texts }} directory and override that on occasion with {{{ $TXTDIR
.
For example:
$ env TXTDIR=${PWD} txt new "お会いできてうれしいです"
txt.conf
- Id: A random, unique, alphanumeric string for distinguishing the repository (at least 6 characters of Crockford's Base32 recommended)
- Title: A human-friendly title
- Authors: Comma-separated list of names (and optionally, addresses in the
<name@domain>
format - Topics: Topics the repository aims to cover (comma-separated)
- Locations: List of URIs where the repository can be accessed
- Peers: List of peer URIs
HTML
There are some special settings for HTML publication:
- HTM-style: path to a CSS style. It will be inserted in every .htm file. To link to a single CSS consider using
@import
- HTM-header: path to a file, inserted in every .htm file, right after the
<body>
tag - HTM-footer: path to a file, inserted in every .htm file, right before the
</body>
tag - HTM-index: if defined, determines the filename for the index files. Left undefined, defaults to
index.html
- HTM-feed: if defined, this will overrite the feed URI used in HTML files. If left undefined the default
feed.atom
is used
Gemtext
Likewise, there are settings for publishing on the Gemini protocol:
- Gemini-index: same as
HTM-index
- Gemini-feed: same as
HTM-feed
, exceptgmi.atom
is used
Note:
See TracWiki
for help on using the wiki.