2.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Configuring tzk
Basic setup
- Change into a directory you'd like to use as your Zettelkasten repository. The directory should be empty, so you'll probably want to create a new one, e.g.: : - $ mkdir my_zettelkasten $ cd my_zettelkasten
- Run - tzk init. This will create a tzk configuration file, install TiddlyWiki to this folder, and set up a Git repository.
- When - inithas completed successfully, open the- tzk_config.pyin your favorite text editor. Read the comments and make any changes you would like. See the- Builderssection of this documentation for more information about builders --but you'll most likely want to get started with your wiki now and worry about builds once you actually have some content to build!
- Run - tzk listenand confirm that you can access your wiki.
Committing
Many people find that carefully designing atomic Git commits when
editing a TiddlyWiki is difficult and not all that useful, so the
tzk commit command is made available to quickly stage,
commit, and (if you wish) push all changes in the repository in one
go.
If you want to push your changes to some remote location, such as a
GitHub repository, add a new Git remote (e.g.,
git remote add origin https://github.com/you/YourRepository)
and set the commit_remote option in your tzk config to the
remote name (here, origin). You can selectively skip
pushing for a particular commit with the --local switch to
tzk commit.
Note
If you want to push a wiki that contains only some of your content to
GitHub in a form that others can browse, don't try to set it up here
--use a publish_wiki_to_github() <tzk.builders.publish_wiki_to_github>
builder at the end of the public build product. See Builders for more
information.
Environment
If you'd like to be able to run tzk from any directory,
rather than having to change into the directory of your tzk repository,
set the TZK_DIRECTORY environment variable on your system
to its full path. If the current directory contains a
tzk_config.py file, the current directory will still be
preferred to the TZK_DIRECTORY directory.
Note
TZK_DIRECTORY is not honored when calling
tzk init. Otherwise tzk would prioritize the
TZK_DIRECTORY over the current directory since the current
directory doesn't contain a config file yet, and it would be impossible
to initialize a second tzk repository.
