Build your first site¶
This walkthrough starts with an empty directory and ends with a local Zensical
site using numbered headings and a cross-reference. It also demonstrates
prodockit.steps: the procedure you are reading is rendered by that extension.
-
Install Python
prodockit requires Python 3.10 or later. Install Python for your operating system, then close and reopen the terminal so the new command is on
PATH.Install Homebrew first if you do not already have it, then run:
Open PowerShell and run:
If
pythonopens the Microsoft Store, search Windows for Manage app execution aliases and turn off the App Installer aliases forpython.exeandpython3.exe. -
Create and activate a virtual environment
Create a directory for the site, then create the virtual environment inside it:
The prompt normally starts with
(.venv)after activation. The rest of the walkthrough usespython, which now means the interpreter inside that virtual environment on all three platforms. -
Install prodockit
Zensical is a core dependency, so this installs the
zensicalcommand too. Confirm both commands are available: -
Create the Zensical project
This creates
zensical.tomland a starterdocs/directory without overwriting unrelated files. -
Enable the two extensions
Add these tables at the end of
zensical.toml:The quoted table names matter: each dotted extension name must remain one TOML key. Extensions are independent, so a project can enable only these two.
-
Add content that uses them
Replace
docs/index.mdwith:# My first document The detail is in \ref{results}. ## Method Describe what you did here. ## Results {: #results } Describe what you found here.prodockit.headingsnumbers the sections.prodockit.refsturns\ref{results}into a link containing the current number and title, so it stays correct if the sections move. -
Preview the site
Open the local address printed in the terminal. Zensical rebuilds the preview when a source file changes; stop it with
Ctrl+C.
Where to go next¶
- Browse the authoring reference when you need another document feature.
- Read Generate a PDF when the website is ready to print or submit.
- Follow the project maintenance cycle when the first site becomes a maintained project, then use the command-line map to choose a command safely.
Previewing these documentation changes
From this repository's root, run zensical serve and open the address it
prints. This page already has prodockit.steps enabled and styled.