Editing these documentation pages#
Important
For project staff only, and it affects these documentation pages only.
Editing here changes the words on these documentation pages — nothing else.
It does not change the edition, the gazetteer, the glossary, or any data shown on the site. Those come from the pipeline, not from this directory.
It needs write access to the repository. Without it these steps will not work, and there is no public contribution route.
If you have spotted a problem in the data rather than in the prose, raise it with the project team rather than editing here.
The documentation lives in the
documentation/
directory of the main repository. Every push to main that touches anything
under that directory triggers the GitHub Pages workflow, which rebuilds the
site and republishes it at
https://ihr-digital.github.io/london-customs-accounts-1380-1560/documentation/ within
a couple of minutes.
You don’t need to install anything to contribute — every step described on this page is done in your web browser on github.com.
Previewing your edits#
The GitHub editor has a Preview tab right next to the text-editing view. It shows the rendered Markdown live as you type, so you can see how headings, lists, tables, links, and images will look before you commit anything. Switching between the Edit and Preview tabs is the normal way to check your work.
The Preview tab shows the Markdown rendering only — the colours, fonts, and navigation of the published site are added later by the build. To see the fully styled page exactly as visitors will, commit your change and wait a couple of minutes for the site to rebuild.
Editing an existing page#
Open the file you want to edit on github.com.
Click the pencil icon in the top-right of the file view.
Make your changes, switching between the Edit and Preview tabs to check how the output looks.
Scroll down, type a short commit message, and click Commit changes.
That’s it — within a couple of minutes the site rebuilds and your edit goes live.
Note
The build treats Sphinx warnings as errors (sphinx-build -W), so a broken
internal link or anchor, a malformed table, or a new page missing from the
toctree (see below) stops the whole site from being republished until it is
fixed. If your edit does not appear, check the workflow run’s log on the
repository’s Actions tab.
Adding a new page#
Open the
documentation/content/folder on github.com.Click Add file → Create new file.
Type a filename ending in
.md(e.g.customs-officers.md) and write your page. Use the Preview tab to check formatting as you go.Click Commit changes.
Open
documentation/index.rstand click the pencil icon. Add a line for your new file under thetoctreedirective, for example:My New Page <content/my-new-page.md>Without this entry the page is built but won’t appear in the sidebar.
Commit. The site rebuilds and the new page is live within a couple of minutes.
Uploading Word documents#
If you have an existing draft as a Microsoft Word document, you can upload it through the GitHub web UI and the site will convert it automatically.
How to upload#
Open the
documentation/_drafts/folder on github.com.Click Add file → Upload files and drop your
.docx(or.doc) into the page.Add a one-line commit message (“Add draft on …”) and click Commit changes.
The GitHub Pages workflow then:
Runs pandoc over each Word document.
Writes the converted Markdown to
documentation/content/<filename>.md(lower-cased, spaces turned into hyphens, any character other than letters, digits and hyphens dropped:Customs Officers.docxbecomescustoms-officers.md, butcustoms_officers.docxbecomescustomsofficers.md).Extracts any embedded images into
documentation/_static/media/<filename>/.Deletes the original
.docxfrom_drafts/.Commits the result back to
main.Rebuilds and republishes the site, so the new page is live.
For legacy .doc files (pre-Word-2007), LibreOffice in the workflow
first promotes them to .docx before pandoc runs.
What you need to do afterwards#
Pandoc handles the bulk of the conversion reliably — body text, paragraphs, headings, lists, simple tables, footnotes, hyperlinks, and embedded images all come through.
You will usually still want to follow up with some manual editing, which you can do directly in the GitHub web editor using the same pencil-icon workflow described above:
Add the new page to the navigation. Open
documentation/index.rstand add a line for your converted file under thetoctreedirective. Without this, the page is built but won’t appear in the sidebar.Tidy any awkward formatting. Word-specific styling (text boxes, multi-column layouts, equation editor output, smart-art diagrams) rarely survives. Open the converted
.mdand clean it up in the web editor, using the Preview tab to check the result.Review image placement. Pandoc emits images inline at the same point they appeared in Word, but very large images may need resizing or moving to an admonition.
Promote tables if needed. Complex Word tables can come through as HTML blocks. They render fine, but a hand-edited Markdown table is cleaner.
Things to know#
The folder name
_draftsis significant — the workflow only looks there. Uploading a.docxanywhere else has no effect.If you upload
pipeline.docxand apipeline.mdalready exists, the existing file is overwritten. Rename your upload first if that isn’t what you want.The conversion commit is authored by
github-actions[bot], so the history clearly shows what was generated and what was hand-edited afterwards.If the conversion fails (a corrupt file, an unknown format), the workflow log will show the pandoc error. The
.docxstays in_drafts/so you can fix the source and try again.