The Unofficial AutoSite Manual

Ins, Outs, and Includes

The AutoSite life

AutoSite works by taking stripped down pages in one folder and pairing each one with the gooey, shiny, pretty layout stuff in the template. This means you can have a slew of pages, all structured the same, and if you notice a problem on any one of them, you only need to fix the template and rerun the script.

One thing before I go into what each folder is for: folder structure does matter with AutoSite. If you have a page in, say, in/usage/, the resulting final page will appear in out/usage/.

In

The In folder is where all of your actual content goes. In pages are bare-bones and feature only the content unique to that page. No formatting, no headers, no footers. (Well, you could have all those things on an In page, but that kinda defeats the point, doesn't it?) In pages can be either HTML or Markdown.

The only thing unique to In pages are the comment metadata at the start of each one. Looks a little something like this:

<!-- attrib title: Ins, Outs, and Includes -->
<!-- attrib subtitle: The AutoSite life -->
<!-- attrib description: Your work with AutoSite revolves around three folders: what goes in, what comes out, and what gets included. -->
<!-- attrib template: info -->

These are variables, and they're used to fill in pieces on the template. I talk about variables in Chapter Four: Variables, and Custom Ones.

Out

The Out folder is where AutoSite dumps all your generated pages. It takes each of the In pages, stuffs it into the template you've specified, and puts the result in the Out folder. This is what you'll want to upload to Neocities.

The Out folder will get deleted and regenerated every time the script is run. Because it'll look like an exact mirror, make sure you're editing your In files or Includes files, not your Out files.

Includes

The Includes folder is special. AutoSite doesn't touch anything in here; it merely copies it to the Out folder, again mirroring the exact folder structure of what's inside it. This makes it ideal for scripts, stylesheets, images—"site assets", if you will.

Any HTML you throw in here will also be copied straight over. This is good if you have a page that you don't want touched by the script (say, a hand-made 404 page).

There's one more folder we haven't discussed, but it's the other half of the equation: templates.