Directory structure
Each series lives at its own subdomain of localhost, so the rules of the “link game” inside a series match the rules of the open Web. The route /style.css resolves against the series’ own root; a page at /blog/my-first-article linking to /style.css works the same way it would on any regular website. Relative paths (./style.css, ../style.css) resolve relative to the current page in the usual way.
Changes applied by the SAMIZDAT CLI
This is something that is also related to directory structure, which is worth mentioning. The SAMIZDAT CLI does not mount collections as an exact copy of the build directory. Here is what is meddled with:
- A folder
foo/barcontaining a fileindex.htmlwill also have a pathfoo/barwith the same content asindex.html. This is standard in many web servers and helps to create shorter, more memorable URLs. - A sitemap file called
_inventoryis added to the collection root. This is a JSON file containing all paths in the collection, associated to their respective object hashes.
Please be aware of these transformations when developing your series.