Build site manually¶
This section explains how to Install manually by preparing a computer and a project. It covers macOS, Windows, and Linux (Ubuntu). The commands create the same working setup whether you are starting a new project from the Prodockit template or downloading a repository that already contains work.
Manual installation is not recommended
Manual installation is a long process with many opportunities for problems, including failed downloads, partial installations, and mistakes in commands. This is why Prodockit provides Bootstrap and Adopt: they automate most of the work and verify each stage. You may still prefer to install everything yourself, and this section documents that route. It also demonstrates why producing a PDF containing Mermaid diagrams and MathJax notation is not simple: the process depends on several Python, system, browser, font, and Node.js components working together.
Work through the steps in order. Where a tool is already installed, still run the check shown for it before continuing.
Manual installation stages¶
Each stage groups a related part of the installation. Complete its numbered steps before moving to the next stage.
Stage 1 — Prepare the computer¶
Install the shared tools and identify the Git account that will own the work.
-
Prepare Python and the setup environment
Complete section 3.1, Prepare Python and its environment first. It installs Python 3.14, creates the setup
.venvin your parent repositories directory, activates it, and verifies that the shell is using the intended interpreter.Open section 3.1 to prepare your environment
Remain in that parent directory with the setup environment active for the machine and repository preparation below. The instructions explicitly say when to enter the project, deactivate this setup environment, and create the project's own
.venv. -
Install Visual Studio Code
Visual Studio Code (VS Code) is the editor we have chosen for developing the documentation using Zensical. You can use other editors, but the availability of many plugins in Visual Studio Code will help you edit your documentation more efficiently.
Install Visual Studio Code and its essential plugins with the steps below. If VS Code is already installed, check that the plugins are present.
Start with installing Visual Studio Code. Instructions for macOS, Windows, and Linux (Ubuntu/Debian) are below.
- Open the Terminal application.
-
You are likely to already have Homebrew installed, but if not, follow the instructions on brew.sh to install it. Close and reopen your Terminal after installing it. As the installer adds
brewto yourPATH, and a session that was already open won't pick that up. -
Use the Homebrew package manager to install Visual Studio Code in your Terminal:
- Download the VS Code User setup for Windows from the official website.
- Run the installer,
VSCodeUserSetup-{version}.exe. By default the User setup installs Visual Studio Code to your user profile directory. You can change the install location if you want to install it for all users.
- Download the
.debpackage from the official website. - Open a terminal and navigate to the directory where you downloaded the
.debpackage. - Run the following command to install Visual Studio Code:
Replace
<file>with the name of the downloaded.debfile.
Further installation instructions are available on the Visual Studio Code website.
-
Install Git
Git is a version control system that enables you to track changes to your code and collaborate with others. You will be using Git to manage your documentation website and push your changes to your GitLab or GitHub cloud repository.
Install and configure Git next. The instructions below work with both GitLab and GitHub.
Start by installing Git and configuring it for Visual Studio Code. The instructions below are for macOS, Windows, and Linux (Ubuntu/Debian).
- As a start, you need to install the
gitcommand. Follow the instructions below to install or updategitto the latest stable version.
Use the Homebrew package manager to install or update
gitto the latest stable version:Open up a PowerShell Administrator window and install
gitusing the command, or you can download and install the official git installer from git-scm.com.If you just require an updated version of
git, you can run the following command in PowerShell:Close down PowerShell and reopen it after installing or updating
gitto ensure that the new version is available in yourPATH. Check the version ofgitinstalled by running the following command in PowerShell: - As a start, you need to install the
-
Configure your Git identity
- Before connecting to any cloud provider, open your terminal (Terminal on macOS/Debian, Git Bash or PowerShell on Windows) and set your global username. This is the identity stamped onto your commits.
Then set the email address to go with it. Make sure it's the same one you used to register for your GitLab or GitHub account.
Already use Git for other projects?
--globalapplies everywhere, on this project and every other one on your machine - the only option available right now, since you haven't cloned anything yet to scope it to. If you already have a Git identity set up for your own projects, run both commands again with--localinstead once you've cloned the template below, so this project's commits use these details without changing your identity anywhere else. -
Register with the Git hosting service
Register for an account on the public GitLab or GitHub cloud instance you will use. If you have already registered, you can skip this step.
Stage 2 — Configure secure Git access¶
Create SSH keys, protect them, and confirm that the hosting service accepts them before downloading a project.
-
Generate the SSH keys
Configure SSH keys to authenticate with your GitLab or GitHub account.
- Follow the instructions below to generate a new ssh key pair and add it to your account. It's best practice to use a modern, secure
ed25519key. -
Open the Terminal application.
-
Generate the key for GitHub. Only the email address needs changing - the rest of the command is complete as written:
-
Then generate a separate key for GitLab:
-
When prompted, type a strong passphrase. You are asked once per key, so this happens twice.
- Open the PowerShell application.
-
Create the
.sshfolder, if it doesn't already exist: -
Generate the key for GitHub. Only the email address needs changing - the rest of the command is complete as written:
-
Then generate a separate key for GitLab:
-
When prompted, type a strong passphrase. You are asked once per key, so this happens twice.
-
Open the Terminal application.
-
Generate the key for GitHub. Only the email address needs changing - the rest of the command is complete as written:
-
Then generate a separate key for GitLab:
-
When prompted, type a strong passphrase. You are asked once per key, so this happens twice.
gitxxxin the steps that followYou now have two key files,
id_ed25519_githubandid_ed25519_gitlab. The remaining steps are written once, withgitxxxstanding for whichever of the two you are working on - so run them twice, substitutinggithuband thengitlab. - Follow the instructions below to generate a new ssh key pair and add it to your account. It's best practice to use a modern, secure
-
Configure SSH to use the keys
- Configure the SSH config file to use the correct key for each service.
Open the file in your preferred text editor (create it if it does not exist) - for example with
nano:Paste in the configuration below, then save and close (
Ctrl+Oto save,Ctrl+Xto exit, in nano).Create the file from PowerShell first, then open it - creating it directly inside an editor risks Notepad naming it
config.txtinstead ofconfig:(Use
notepadin place ofcodeif you'd rather not use VS Code.) Paste in the configuration below, then save.The file must be called
config, with no extensionNotepad silently appends
.txtunless you prevent it, and Windows hides known extensions in File Explorer, soconfig.txtlooks identical toconfig. SSH reads only a file named exactlyconfig- a misnamed one is ignored entirely, andgit clonefalls back to asking for a password that will never be accepted. Creating the file withNew-Itemfirst avoids this. To check, and fix it if needed:The configuration to paste in:
# GitLab Host gitlab.com HostName gitlab.com User git IdentityFile ~/.ssh/id_ed25519_gitlab AddKeysToAgent yes # GitHub Host github.com HostName github.com User git IdentityFile ~/.ssh/id_ed25519_github AddKeysToAgent yesMake sure to replace the paths with the correct paths to your SSH keys if you used different names or locations.
AddKeysToAgent yesis what makes the key-loading step below self-healing - without it, the key you add to the agent today is gone the next time the agent restarts (a reboot, a logout, on some setups just time), and SSH fails with a permission error that looks like a rejected key rather than a missing one, since the public half still authenticates fine and only the signing step - which needs the private half - actually fails.On macOS, add one more line
Add
UseKeychain yestoo, in eachHostblock above, so macOS can supply the passphrase from your login keychain instead of asking every time - paired with--apple-use-keychainonssh-addbelow. This directive is Apple-specific: don't add it on Windows or Linux, where it isn't recognised and breaks everysshcommand that reads this file withBad configuration option: usekeychain.Tip
Separate keys per account are safer, but if you reuse one, add its public key to each account separately in Integrate Visual Studio Code with Git below.
-
Protect the SSH configuration and private keys
- Set the correct permissions for the SSH config file and the private key(s) to ensure they're secure. If you are using macOS or Linux, run the following commands in your terminal, substituting
gitxxxand paths to your SSH keys if you used different names or locations:
Windows handles permissions differently and are normally set to only allow access to the user, but ensure that the private key(s) aren't accessible to other users.
- Set the correct permissions for the SSH config file and the private key(s) to ensure they're secure. If you are using macOS or Linux, run the following commands in your terminal, substituting
-
Load the private keys into the SSH agent
- You've set a passphrase for the SSH keys, so you'll need to enter it every time you use a key. To avoid this, you can use an SSH agent to cache your passphrase. Follow the instructions below to start the SSH agent and add your keys.
-
macOS normally starts an SSH agent for you automatically. Add your SSH private keys to it, substituting
gitxxxwith eithergithuborgitlabdepending on which service you are adding the key for ---apple-use-keychainstores the passphrase in your login keychain, so the key survives a reboot instead of silently dropping out of the agent:If this fails with an error about not being able to connect to the agent, start one first, then repeat the command above:
-
Set the SSH agent to start automatically with Windows, and then start it. Run these in a PowerShell window opened as Administrator (right-click the Start menu, or search for PowerShell, then select Run as administrator):
Run in that order, in an Administrator window
Windows ships this service disabled, so
Set-Servicehas to take it out of that state beforeStart-Servicehas anything it's allowed to start - reversed, the first command fails withCannot start service ssh-agent. Both commands also need elevation: an ordinary window fails withAccess is denied, which then makes the second command fail too, for the same underlying reason.An Administrator PowerShell opens in
C:\WINDOWS\system32(an ordinary one opens inC:\Users\yourname), and its title bar says Administrator.Check it worked before moving on:
The Status column should read
Running. If it still saysStopped, confirm the PowerShell window really is running as Administrator - the title bar says Administrator when it is. -
Back in your normal (non-administrator) PowerShell window, add your SSH private keys to the agent, substituting
gitxxxwith eithergithuborgitlabdepending on which service you are adding the key for: -
Add your SSH private keys to the running SSH agent, substituting
gitxxxwith eithergithuborgitlabdepending on which service you are adding the key for:Unlike macOS, Linux doesn't always start an SSH agent automatically. If the command above fails with an error about not being able to connect to the agent, start one first, then repeat the command above:
-
Copy the public keys
- Display your public key, so you can copy it - the next section needs it pasted into your GitLab and GitHub accounts. Only the public key goes there; never paste the private one (the file with no
.pubextension).
Substitute
gitxxxas before, and run it once for each key you generated. Select the entire line it prints - starting withssh-ed25519and ending with the email address you gave it - and copy it. - Display your public key, so you can copy it - the next section needs it pasted into your GitLab and GitHub accounts. Only the public key goes there; never paste the private one (the file with no
-
Add the public keys to GitLab or GitHub
Add each public key to its hosting account, test the connection, and then let Visual Studio Code use the same Git installation.
- Now that you've generated your keys and finished the configuration, add them to your GitHub and GitLab accounts using the instructions below.
- Log in to your GitLab account in a web browser.
- In the top-right corner, click on your profile avatar and select Edit profile.
- On the left-hand sidebar, select Access > SSH Keys.
- Click Add new key and fill out the following details:
- Title: Give it a clear name (e.g., VS Code Extension).
- Key: Paste the contents of your public SSH key file (e.g.,
~/.ssh/id_ed25519_gitlab.pub). - Expiration date: GitLab fills this in for you, one year ahead, and will not let you leave it empty. Set it well into the future - the end of your course or project, say - or you will be locked out mid-way through and have to generate and register a new key.
- Click Add key to save the key.
- Log in to your GitHub account in a web browser.
- In the top-right corner, click on your profile avatar and select Settings.
- On the left-hand sidebar, select SSH and GPG keys.
- Click New SSH key and fill out the following details:
- Title: Give it a clear name (e.g., VS Code Extension).
- Key: Paste the contents of your public SSH key file (e.g.,
~/.ssh/id_ed25519_github.pub).
- Click Add SSH key to save the key.
An expired key fails confusingly
When the date passes,
git pushandgit pullstop working with a permission error that looks like a misconfigured key rather than an expired one. If pushing suddenly fails having worked for months, check this date first.No expiry date to set here
Unlike GitLab, GitHub SSH keys have no expiration field - the key stays valid until you delete it, so there is nothing to set.
-
Test the SSH connection
- Test the SSH connection to GitHub and GitLab to ensure that the keys are working correctly. Run the following commands in your terminal:
If successful, you will see greetings like:
Stage 3 — Get the project¶
Choose the route that matches the repository's current state, then prepare the local project without losing any existing history.
-
Get the project
This section explains how to get a project onto the computer. A repository is the project and its saved history. GitLab or GitHub keeps the online copy; a clone is the working copy on your computer. Git calls the online repository connected to a clone
origin.There are two different starting points. Table 7.1 shows which path to follow; complete only that path.
1. Choose the safe manual project path
Starting point Path to follow Your repository does not exist yet, or exists but is completely empty Path 1: start from the template Your repository already contains one or more commits Path 2: clone the existing repository Do not replace the history of an existing repository
Path 1 starts a new history. Never use its history step on a repository that already contains work. Use Path 2 so every existing commit, branch, and file is preserved.
-
Return to the repositories directory
Use the lowercase repositories directory and setup environment prepared in section 3.1. The examples use
repos; substitute the name you chose.The
cdorSet-Locationcommand changes the current directory. The clone command creates the project folder inside it. Reactivate this setup environment in every new terminal until the project build environment is created. -
Path 1: start from the template
Create a project from the template with this path when there is no repository for the project yet, or when you have deliberately created an empty one. It copies the template files, starts a clean history for your work, and connects that history to your own GitLab or GitHub repository.
- Create a blank repository on the service where the work will be kept.
-
Copy the repository's SSH clone URL from its web page and keep it for the
git remote addcommand below. An SSH URL starts withgit@. -
Clone the template into a folder named after your project. Replace
report-az1234with the exact repository name you chose. -
Change into the project directory as a separate step:
-
Check which online repository the clone currently uses:
-
Move the template's history to a recoverable backup, then start a new history. The files in the project are not moved or deleted.
-
Connect the clean local history to your blank online repository. Use the SSH URL you copied earlier:
-
Run
git remote -vagain. Both lines must now show your repository, notprodockit-template:
On the GitLab website, select New project > Create blank project. Give it the required name, set its visibility to Private, and untick Initialize repository with a README.
On the GitHub website, select New repository. Give it the required name, set it to Private, and leave every Initialize this repository with option unticked.
The repository must be empty because the template provides the README, licence,
.gitignore, and first commit. Initialising any of those on the website creates a competing history before your files arrive.git clonedownloads both the files and the template's Git history. The second name tells Git what to call the new local folder.Both lines should point to
prodockit-template. Do not push while that is true:originstill means the template, not your repository.Why move
.gitinstead of deleting it?The hidden
.gitdirectory contains the template's history and its connection to the template repository. Moving it removes both from the active project, but the sibling backup remains available if you made a mistake.git initthen creates a clean history owned by this project.core.fileMode falseprevents file-permission changes made by Windows or cloud-sync software appearing as edits.Do not commit or push yet. After the shared installation steps,
prodockit sync-repowill replace the template's own links before your first commit is created. -
Path 2: clone the existing repository
Clone an existing repository with this path when the GitLab or GitHub repository already contains work. A repository with a visible file list or any entry under Commits is not empty. This path keeps its complete history and keeps
originpointing to the same place.-
Open the repository in GitLab or GitHub. Select Code, choose SSH, and copy the URL. Check the browser address and repository name carefully; similar project names can lead to cloning the wrong work without an error.
-
Clone that URL. For example:
-
Change into the cloned project as a separate step:
-
Keep its history and configure this clone to ignore file-permission noise:
-
Confirm the clone is connected to the expected repository and has a commit:
originshould show the repository you copied.git logshould show the latest saved change.git status --shortshould print nothing, meaning the new clone has no unsaved local changes.You now have the project locally. The remaining sections are shared by both paths and install everything needed to edit, build, and publish it.
-
-
Confirm the commit identity for this project
Git records an author's name and email address with every commit. Set them inside this repository so they do not depend on settings from another project:
Check what Git will use:
Use the email address associated with the GitLab or GitHub account that owns the repository.
Stage 4 — Create the project environment¶
Replace the temporary setup environment with the project's own environment, then install and verify the Python-based build tools.
-
Create the project environment and install Zensical
Use the instructions below to create and activate a project-specific Python virtual environment, then install Zensical and the PDF system libraries on macOS, Windows, and Ubuntu. Refer to the official Python installation documentation if you use another operating system.
Automated machine setup
For automated machine and project setup, use Build a template site. Its
prodockit bootstrapcommand works in recoverable stages and checks completed work when it resumes. This page remains useful when you need to understand or perform each command yourself.Use the project
.venvRun every Python and prodockit command from this point with the project's
.venvactive. If you deliberately use Conda, Poetry, uv, or another environment manager, adapt the creation and activation commands and make surepython -m pipinstalls into that environment rather than the system Python.The prompt may currently show the parent repositories directory's
.venv. If it does, rundeactivatenow. The commands below create a new.venvin the current project directory. This second environment contains the project's build packages and is the environment used for all later editing and building.- Follow the instructions below to create and activate the project environment with the Python 3.14 interpreter installed at the start of this page.
-
Install Pango, which is not a Python package, so
pipcannot install it for you: -
Install Pandoc:
Why Pandoc and Pango
prodockit pdfshells out topandoc, which hands the result to WeasyPrint to lay out the pages - and WeasyPrint draws text through Pango, sopangoalone is enough (glib, HarfBuzz and fontconfig come along as its dependencies). Skipping either still looks fine right up untilprodockit pdf, which then fails withpandoc exited with status 43- see WeasyPrint cannot load its graphics libraries if that happens. -
Install the desktop font files this template's PDF uses by default - Inter and JetBrains Mono:
Why this early
The website loads its fonts from a CDN at view time, but the PDF has no such fallback. WeasyPrint has to embed the actual font files and silently substitutes a fallback if they are missing. Generate a PDF explains the complete build.
-
Open Terminal in your project folder and create the virtual environment:
Then activate it as a separate step:
Your prompt gains a
(.venv)prefix, which is how you know the virtual environment is active:It disappears when you close the terminal, and every new one needs activating again - or let VS Code do it, which the Python extension below handles for you.
Why the full path to Python
macOS may provide another Python. Asking Homebrew for the
python@3.14prefix ensures.venvuses the interpreter you checked at the start of this page on both Apple silicon and Intel Macs. -
Install the Pandoc release used by Bootstrap and the continuous integration workflows. Open PowerShell and run:
The package is under its author's name, not
Pandocwinget identifies packages as
Publisher.Package, and Pandoc's publisher is its author, John MacFarlane. There is noPandoc.Pandoc, so guessing that gives:winget search pandoclists the real identifier if you ever need to check it. -
Install the graphics libraries WeasyPrint needs. Pandoc hands your document to WeasyPrint to lay out the pages, and WeasyPrint is not pure Python - it draws text through Pango, which on Windows comes from MSYS2. Install MSYS2 first:
Ask the active Python which processor architecture its DLLs must match:
Then use the matching tab. Choose from Python's answer, not from the computer's advertised processor: Windows on ARM can run x64 Python under emulation.
If that fails partway through with a download error, run it again. MSYS2 selects mirrors automatically, and a temporary mirror failure does not mean the package name is wrong.
Tell WeasyPrint where those libraries are, both in this PowerShell window and in future ones:
$env:WEASYPRINT_DLL_DIRECTORIES = $MsysBin [Environment]::SetEnvironmentVariable("WEASYPRINT_DLL_DIRECTORIES", $MsysBin, "User") $env:Path = "$env:Path;$MsysBin" $UserPath = [Environment]::GetEnvironmentVariable("Path", "User") if (($UserPath -split ";") -notcontains $MsysBin) { [Environment]::SetEnvironmentVariable("Path", "$UserPath;$MsysBin", "User") }The first two assignments make the current installation run work immediately. The user-level settings make new terminals and VS Code find the same libraries later.
Python and the DLLs must have the same architecture
Error
0xc1means Windows found a DLL built for a different processor. AMD64 Python usesucrt64; native ARM64 Python usesclangarm64. Bootstrap makes this decision from the running Python executable for the same reason.Why this is needed
That folder is where WeasyPrint finds
libgobject-2.0-0.dll,libpango-1.0-0.dll,libharfbuzz-0.dllandlibfontconfig-1.dll- installingpangobrings all four in. Skipping this still looks fine untilprodockit pdf, which then fails withpandoc exited with status 43- see WeasyPrint cannot load its graphics libraries if that happens. -
Install the desktop font files this template's PDF uses by default - Inter and JetBrains Mono. Download the desktop (
.ttf/.otf) files for each - Inter, JetBrains Mono - then select them all, right-click, and choose Install for all users.Why this early
The website loads its fonts from a CDN at view time, but the PDF has no such fallback. WeasyPrint must embed the desktop
.ttfor.otffiles and silently substitutes a fallback if they are missing. Generate a PDF explains the build. -
The PowerShell execution policy was set when the setup environment was created. If you chose not to change it, use classic CMD and run
.\.venv\Scripts\activate.batwhen activating the project environment. -
Confirm you are still in your project folder:
Check where you are first
The steps above will have moved you. The SSH agent needed an Administrator window, which opens in
C:\WINDOWS\system32, and every "close and reopen PowerShell" leaves you in your home directory,C:\Users\yourname.py -3.14 -m venv .venvdoes not object to either. It creates a perfectly good virtual environment in the wrong place, and the mistake only shows up a step later whenpip install -r requirements.txtcannot find a file that is sitting in your project folder all along.pwdprints where you are.Create the virtual environment:
Then activate it as a separate step. Use the command matching your terminal:
Your prompt gains a
(.venv)prefix, which is how you know the virtual environment is active:It disappears when you close the terminal, and every new one needs activating again - or let VS Code do it, which the Python extension below handles for you.
-
Open a terminal and install the exact Pandoc release used by Bootstrap, the graphics libraries WeasyPrint needs, and the fonts this template's PDF uses by default:
sudo apt update sudo apt install -y curl curl -fsSL -o /tmp/pandoc.deb "https://github.com/jgm/pandoc/releases/download/3.10.1/pandoc-3.10.1-1-$(dpkg --print-architecture).deb" sudo apt install -y /tmp/pandoc.deb sudo apt install -y \ libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 \ fonts-inter fonts-jetbrains-monoWhy the three library packages
Pandoc hands the result to WeasyPrint, which draws text through Pango and won't start without it.
libharfbuzz-subset0is easy to miss - on Debian it's a separate package fromlibharfbuzz0b, and WeasyPrint needs this one specifically (glib and fontconfig aren't listed, sincelibpango-1.0-0already depends on them). Skipping this still looks fine untilprodockit pdf, which then fails withpandoc exited with status 43- see WeasyPrint cannot load its graphics libraries if that happens.Use a supported Debian or Ubuntu release
libharfbuzz-subset0does not exist on older releases. If the package cannot be found, upgrade the distribution rather than hunting for a substitute package.Why the fonts, this early
The website loads its fonts from a CDN at view time, but the PDF has no such fallback. WeasyPrint must embed the installed files and silently substitutes a fallback if they are missing. Generate a PDF explains the complete build.
-
Navigate to your project folder, then create a virtual environment:
Activate it as a separate step:
Your prompt gains a
(.venv)prefix, which is how you know the virtual environment is active:It disappears when you close the terminal, and every new one needs activating again - or let VS Code do it, which the Python extension below handles for you.
-
Verify Pandoc and install the project packages
These commands follow Bootstrap's current Pandoc 3.10.1 requirement. Prodockit's tested combination can change in a later release;
pdk diagand Requirements and dependencies are the authority when they differ from a copied command.Confirm which version you actually have:
The first line should report
pandoc 3.10.1.- Install Zensical and prodockit inside the active virtual environment. The
requirements.txtfile lists the required packages, so install them with the environment's own Python: -
Check that the
prodockitcommand actually resolves to the one you just installed: -
Check that WeasyPrint can find its graphics libraries. This is the one part of the setup
pipcannot verify for you, so it is worth confirming now rather than at your first PDF build: -
Fetch the citation style your first build needs. The template enables
prodockit.bibliographyby default, pointingcsl_styleatharvard-cite-them-right.csl- but that file isn't part of the clone, sozensical serve/zensical build/prodockit pdfall fail outright until it's in place. Fetch it once, from your project root: -
Check the repository's own links against
origin:
python -m pip install -r requirements.txt python -m prodockit.toolchain install-pandoc --version 3.10.1Using
python -m pipties the install to the active environment. Do not usesudo pip, and do not continue if the prompt has lost its(.venv)prefix.pipexiting without an error only means the package landed in.venv- it doesn't prove your shell finds it there first. An older, separately-installedprodockitearlier on yourPATHshadows it silently, and every command in this guide from here on would run against that instead.A version number means everything is in place. If instead you get a long error ending in
cannot load library, the libraries from the step above are missing or cannot be found - go back and install them.See BibTeX bibliography for what this feature does and how to configure a different CSL style.
Path 1 still contains the template's repository name, so the check will report the changes it needs. Apply them:
It reports what it changed, for example:
Detected GitHub remote (https://github.com/your-username/report-az1234); updated: repo_url, repo_name, theme.icon.repo, README badgesThis rewrites
repo_url,repo_name,theme.icon.repoandedit_uriinzensical.toml, plus the badge row in yourREADME.md, to match theoriginyou just set - so your built site and PDF link to your own repository rather than the template's. Notetheme.icon.repoin that list: moving from a GitHub template to a GitLab project switches the header's brand icon to match, which is easy to miss by hand. Only the values that actually needed changing are listed, so the set you see may be smaller.On Path 2, the check should normally report that everything already matches. If it reports changes, first confirm
git remote -vshows the correct repository. Then runprodockit sync-repoto apply them.Check it any time
prodockit sync-repo --checkwrites nothing and exits non-zero if these have drifted from your remote - useful after any later change of host. See Test the built output. - Install Zensical and prodockit inside the active virtual environment. The
Stage 5 — Add editor and rendering tools¶
Configure the editor and install the optional diagram and mathematics renderers used by the project.
-
Install Zensical Studio and the editor plugins
Now we'll install the Zensical Studio plugin for Visual Studio Code, which provides a set of tools to help you work with Zensical projects, including commands to build and preview your site. Then we'll install a couple of other useful plugins for working with Markdown and TOML files.
- Start by opening Visual Studio Code and navigating to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing
Ctrl+Shift+X/Cmd+Shift+X. - Install the Python extension (published by Microsoft) by searching for "Python" in the Extensions view and clicking Install. As well as Python support, this is what makes VS Code notice the
.venvfolder in your project and activate the virtual environment automatically in every new Terminal in VS Code - so you don't have to runsource .venv/bin/activateby hand each time you open one. -
Install the Zensical Studio extension by searching for "Zensical Studio" in the Extensions view and clicking Install and then Trust Publisher and Install when prompted. This extension provides a set of tools to help you work with Zensical projects, including commands to build and preview your site.
- Follow the instructions on the Zensical Studio extension page to configure
it. The current template already contains the required setting. If an
older repository does not, add this to
.vscode/settings.json: -
Install the Even Better TOML extension for Visual Studio Code by searching for "Even Better TOML" in the Extensions view and clicking Install and then Trust Publisher and Install when prompted. This extension provides syntax highlighting and other features for working with TOML files, which are used for configuration in Zensical projects.
- Install the LTeX+ – LanguageTool grammar/spell checking plugin for Visual Studio Code by searching for "LTeX+" in the Extensions view and clicking Install and then Trust Publisher and Install to enable spelling and grammar checking for Markdown. Configure the plugin's language setting to whichever English (or other language LTeX+ supports) you're actually writing in.
Tip
Check it worked by opening a new terminal (Terminal > New Terminal) - the prompt should start with
(.venv). If it doesn't, reopen VS Code in the project folder, then choose Python: Select Interpreter from the Command Palette (Ctrl+Shift+P/Cmd+Shift+P) and pick the one inside.venv.Get this right, or corrections are confidently wrong
Set to the wrong variety, LTeX+ still checks every sentence - it just checks it against the wrong rules, and offers "corrections" for perfectly correct spelling and phrasing in the variety you're actually using. That's worse than no checking at all, since a wrong suggestion looks exactly as confident as a right one.
There are many other extensions available for Visual Studio Code that can help you with your documentation. You can explore the Visual Studio Code Marketplace to find more extensions that suit your needs.
- Start by opening Visual Studio Code and navigating to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing
-
Install the diagram and maths tooling
Install diagram and maths tooling when the document contains diagrams or mathematical notation; the earlier steps do not install these tools.
On the website they look after themselves: the reader's browser draws them as the page loads. A PDF has no browser, so
prodockit pdfconverts both into images before building the document, using two Node.js programs to do it.Without these, the PDF is wrong rather than missing
prodockit pdfdoes not fail when they are absent. It leaves the content as it found it, so instead of a flowchart your PDF shows the diagram's own definition text - thegraph LRline and every node written out beneath it - and instead of a typeset equation, raw LaTeX with all its backslashes and braces.Meanwhile the website renders both perfectly. So nothing looks wrong until somebody opens the PDF, which may be well after you have written the document.
-
Install Node.js
The two tools are Node.js programs, so install Node.js first. Check the current Extensions requirement if the installed release is rejected by the toolchain.
Close and reopen PowerShell afterwards, so it picks up the new
PATH. The new window starts in your home directory. First change back to the project:Then activate its virtual environment as a separate step:
Check the prompt starts with
(.venv)again. The next step'snpm cicommands are relative to your project folder, and everyprodockitcommand after it lives inside the virtual environment - outside it, PowerShell reportsThe term 'prodockit' is not recognized.Install Node.js and npm from Ubuntu's package repository:
If Ubuntu supplies an older release than prodockit currently supports, look up the current requirement in the Extensions installation guide, then follow the NodeSource installation instructions for a supported release.
Check it worked - both commands, not just the first. Node.js must be 22.12.0 or later:
You should get two version numbers. Compare the Node.js result with the current Extensions requirement.
nodeanswers butnpmis not foundRe-run
sudo apt install -y nodejs npmand review any error it reports. The two packages should come from the same source so that they stay in step. -
Install the diagram and maths toolchains
Your cloned template already contains the manifests and lockfiles for both tools, in
tools/mermaidandtools/mathjax- so you only need to install them.If you're on Linux, install a native Chromium and point Puppeteer at it before running
npm cibelow, rather than lettingtools/mermaid's ownnpm cidownload one for you - Puppeteer's download is not guaranteed to match your CPU's architecture. This matters most on ARM64 machines (an Apple Silicon Linux VM, an AWS Graviton instance, a Raspberry Pi), wherenpm ciwould otherwise silently fetch an x86_64 Chrome build it can never run, but it costs nothing to do on any Ubuntu install:The second command should print a path such as
/usr/bin/chromium-browseror/usr/bin/chromium- that's what the next step needs. Point Puppeteer at it, and skip its own download entirely, for this session, then make both permanent so every future session picks them up too:export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser || which chromium) export PUPPETEER_SKIP_DOWNLOAD=true echo 'export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser || which chromium)' >> ~/.bashrc echo 'export PUPPETEER_SKIP_DOWNLOAD=true' >> ~/.bashrc source ~/.bashrcIf you opened a new terminal, change back to the project first - the
--prefixpaths below are relative to wherever you run them from:Then activate the project's virtual environment as a separate step:
Then install both:
npm ciinstalls the exact versions recorded in each lockfile, which is what the automated builds use too - so your PDF is rendered by the same versions as the published one.This creates a
node_modulesfolder inside each, which is deliberately not committed (see.gitignore). Run these two commands again if you ever re-clone the project.Install the MathJax bundle and its matching configuration for the website:
This copies the pinned browser bundle from
tools/mathjaxand writes the configuration before the bundle is loaded. Without that configuration, a successful website build can still display raw TeX. The generated files are deliberately excluded from Git, so run this command again after cloning the project onto another computer.If npm reports vulnerabilities or an
allow-scriptswarningBoth are normal here, not a sign anything went wrong:
Run `npm audit` for details. npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts: npm warn allow-scripts puppeteer (postinstall: node install.mjs)The vulnerability count comes from
npm auditscanning the whole dependency tree Puppeteer pulls in for known advisories, most of which don't apply to how this project uses it - a locally-run PDF build, not a public-facing server. There's nothing to fix here; runningnpm audit fixis more likely to break the pinned versions the lockfile records than to help.The
allow-scriptswarning is different: recent npm versions skip Puppeteer's own setup step, which downloads the headless browser Mermaid draws diagrams with. The install still succeeds - if a later PDF build reports it cannot find a browser, approve the step and reinstall:Starting a project that isn't from the template?
Then you have no
tools/directory to install from and needprodockit init-toolsfirst to create it. Running it on a copy of the template is harmless but unnecessary - it reportsKept existingfor each manifest already present. Initialise renderer tools explains the generated files.
Stage 6 — Verify and finish¶
Build every output, then complete the path selected when the project was obtained.
-
Build and finish the setup
Run diagnostics first, then generate the website and PDF before publishing anything:
Open both outputs and check that headings, diagrams, mathematics, tables, and references render correctly. A command completing successfully cannot detect every visual problem.
-
Finish Path 1: make and push the first commit
Path 1 has a new local history and an empty online repository. Check exactly what the first commit will contain:
Generated dependencies such as
.venv,node_modules, and the installed MathJax bundle should not appear because.gitignoreexcludes them. Then save the project and send it toorigin:git commitsaves the first version locally.git pushcopies that commit to GitLab or GitHub and-u origin mainrecords where later pushes should go. -
Finish Path 2: leave existing work unchanged
Installing local dependencies should not alter an existing repository. Check:
An empty status means no project files changed. Matching commit identifiers mean the local
mainbranch is still at the same saved version as the online one. Do not create an "initial" commit and do not force-push an existing repository.If
prodockit sync-repoor an editor setting made an intentional change, review it withgit diffand follow the normal editing workflow in the next section rather than replacing the repository's history.
Understand the completed project¶
This section explains how ownership and future maintenance depend on the manual path used to obtain the project.
Know what becomes yours¶
A manual installation gives you direct responsibility for the commands and project decisions in this section. Use the project structure overview to distinguish source files from the local environments, installed renderer bundles, caches, and generated output that can be recreated.
The maintenance model depends on the path used to obtain the project. Path 1
starts from prodockit-template, so its template manifest continues to
classify template-managed, project-owned, and generated files. Path 2 keeps
whatever ownership and maintenance metadata the existing repository already
had; manually installing Prodockit does not create a template relationship.
Your authored content and project-specific overrides remain yours in both paths. Running the commands manually does not transfer ownership of those files to Prodockit.
Keep the project current¶
Start every maintenance pass in the active project environment. Upgrade the declared requirements by following the same platform-specific installation steps used above, then run Diagnostics before rebuilding:
For a Path 1 template project, preview pdk template-sync and follow the
Template Sync review workflow when an update is available. For a Path 2
project without template metadata, maintain its files through its existing
workflow. If you later want Adopt to align the toolchain and selected
components, begin with pdk adopt --dry-run and review the proposed scope
before applying it.
Where to go next¶
Choose the route that matches the result:
- If setup has not completed or any check fails, use Troubleshooting.
- If setup has completed and
pdk diagpasses, continue with Publish a document.