{"id":32558394,"url":"https://github.com/dotcomboom/autosite-legacy","last_synced_at":"2026-07-04T17:31:26.763Z","repository":{"id":137986632,"uuid":"205750936","full_name":"dotcomboom/AutoSite-Legacy","owner":"dotcomboom","description":"Static site generator (Python flavor)","archived":false,"fork":false,"pushed_at":"2024-01-12T05:03:26.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-22T12:10:07.546Z","etag":null,"topics":["autosite","html","navigation","pypi","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotcomboom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-02T00:52:26.000Z","updated_at":"2024-01-03T07:04:13.000Z","dependencies_parsed_at":"2023-11-16T08:28:42.794Z","dependency_job_id":"0b977dad-e55f-49fe-8420-d00dc1266f58","html_url":"https://github.com/dotcomboom/AutoSite-Legacy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dotcomboom/AutoSite-Legacy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcomboom%2FAutoSite-Legacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcomboom%2FAutoSite-Legacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcomboom%2FAutoSite-Legacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcomboom%2FAutoSite-Legacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotcomboom","download_url":"https://codeload.github.com/dotcomboom/AutoSite-Legacy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcomboom%2FAutoSite-Legacy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35130722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autosite","html","navigation","pypi","python3"],"created_at":"2025-10-28T23:54:34.758Z","updated_at":"2026-07-04T17:31:26.745Z","avatar_url":"https://github.com/dotcomboom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoSite [![PyPI version](https://badge.fury.io/py/AutoSite.svg)](https://badge.fury.io/py/AutoSite)\r\nAutoSite helps you keep all of your website's pages in the same basic template. Managing a navigation bar, a footer, and even meta/OpenGraph tags across several pages is simple.\r\n\r\nThis repository is home to the original AutoSite Python script, updated to functional parity with its .NET-based sibling, [AutoSite](https://github.com/dotcomboom/AutoSite). AutoSite Legacy is cross-platform and aims to provide an elegant CLI option.\r\n\r\n- [PyPI package](https://pypi.org/project/AutoSite/)\r\n- [AutoSite Legacy GitHub](https://github.com/dotcomboom/AutoSite-Legacy/) (Python)\r\n- [AutoSite GitHub](https://github.com/dotcomboom/AutoSite/) (VB.NET)\r\n\r\n## Installation\r\n### As a package\r\nYou can install AutoSite Legacy as a package. You can `cd` to the directory where you're building your site and build with the `autosite` command. It can be installed with the command `pip install autosite` or `pip3 install autosite` depending on your configuration.\r\n\r\nHacking on the script and want to install from the current master branch? You can also install with `pip3 install .`.\r\n\r\n\u003c!--\r\n### As a prebuilt executable\r\nIf your platform supports it, the GitHub Releases page has/will have prebuilt executables that can be run in the console with arguments, or just double clicked in your site's working folder. Whichever you prefer!\r\n--\u003e\r\n\r\n### As a standalone script\r\n[`__init__.py`](https://github.com/dotcomboom/AutoSite-Legacy/blob/master/AutoSite/__init__.py) can be run directly, without installing the package. Just copy it into wherever you're working and you can run it from there. You'll need to install the requirements manually, which are in [the requirements.txt file](https://github.com/dotcomboom/AutoSite-Legacy/blob/master/requirements.txt) with the `pip install -r requirements.txt` or `pip3 install -r requirements.txt` commands (provided that you downloaded or wrote that file to the same directory).\r\n\r\n## Basic Usage\r\n0. Run `autosite`. It will create a basic `default.html` template, and the `pages`, `includes` folders.\r\n1. Edit templates/default.html, filling in with these tags:\r\n\r\n           [#content#] - The page's content.\r\n           [#path#] - The relative file path from root.\r\n           [#root#] - Use this to point to the site's root folder. Helpful for linking to files in `includes`.\r\n           [#modified#] - The page's last modified date.\r\n           \r\n   You can also use any other attributes, like [#title#] or [#description#], provided that you define them in each page as below.\r\n           \r\n2. Add your pages to the \"pages\" folder.\r\n      You can define a title and description, or any other attributes you wish, and tell AutoSite which template to use for the page at the top of the file like so:\r\n           \r\n           \u003c!-- attrib title: Your title --\u003e\r\n           \u003c!-- attrib description: Your description --\u003e\r\n           \u003c!-- attrib template: default --\u003e\r\n           \u003cp\u003eEverything under the above lines will replace [#content#] in template.html.\u003c/p\u003e\r\n              \r\n    Put other site files in the \"includes\" folder. Input pages can be HTML or Markdown files, and use the same attribute syntax.\r\n    \r\n3. Run the script. How long it takes depends on how large your site is. Your pages will be in the \"out\" folder.\r\n\r\nHungry for more? Try these helpful guides on how AutoSite works, contributed by [mariteaux](http://mariteaux.somnolescent.net):\r\n- [The original AutoSite Legacy guide](http://archives.somnolescent.net/web/autosite_legacy/)\r\n- [The official AutoSite Manual](http://autosite.somnolescent.net/manual/)\r\n\r\n## Customization\r\nRun `autosite --help` for more options (see below)!\r\n\r\n    usage: autosite [-h] [-p] [-a] [-q] [-s] [-d DIR] [-m MODIFIED]\r\n\r\n    options:\r\n    -h, --help            show this help message and exit\r\n    -p, --prettify        enables BeautifulSoup4 prettifying on output pages (affects whitespace)\r\n    -a, --auto            skips user input, for use in scripts etc; non-interactive mode\r\n    -q, --quiet           runs silently, skipping user input\r\n    -s, --silent          alias for --quiet\r\n    -d DIR, --dir DIR     run AutoSite at a specific location\r\n    -m MODIFIED, --modified MODIFIED\r\n                            specify date format for the [#modified#] attribute (strftime format; i.e. %Y-%m-%d for 1984-01-19 or %-m/%-d/%Y (*nix) or %#m/%#d/%Y (Windows) for 1/19/1984)\r\n\r\n\u003e **Date format note**: This version defaults to YYYY-MM-DD date format. .NET AutoSite uses the system locale as of 1.0, though this behavior may change. The --modified flag allows for a different [time format](https://www.strfti.me/) to be used.\r\n\r\n\u003e **Site path note**: AutoSite Core uses the site location as a parameter on its own (no flag behind it). This currently isn't the case with Legacy; --dir currently must be used to build a site outside of the current working directory.\r\n\r\n### Example Command\r\n\r\n    autosite --auto --modified \"%#m/%#d/%Y\" --dir \"C:\\Users\\dcb\\Desktop\\AutoSite.1.0.Gold\\SampleSite\"\r\n\r\n## Conditional text\r\nMany sites have a navigation where if you're on a page, that page's name in the navigation is not a link. AutoSite has a feature that lets you replicate this. Consider the following example:\r\n\t\r\n      [path!=index.html]\u003ca href=\"[#root#]index.html\"\u003e[/path!=]\r\n          Home\r\n      [path!=index.html]\u003c/a\u003e[/path!=]\r\n\t\r\nYou can also omit the `!` symbol and it will only show if it is that page, like this:\r\n\r\n      [path=index.html]\u003cp\u003e[/path=]\r\n          This is the index page.\r\n      [path=index.html]\u003cp\u003e[/path=]\r\n\t\r\nConditional text is not limited to just file paths! Nearly any attribute can be used with conditional text. \r\n\r\nAs of 1.4, it is also possible to check for emptiness, like AutoSite (.NET). For example:\r\n\r\n      [ready=]This page is not ready (its ready attribute is not set)[/ready=]\r\n      [subtitle!=]\u003ch2\u003e[#subtitle#]\u003c/h2\u003e[/subtitle!=]\r\n\r\nHowever, conditional text still has some limitations. You can only have one instance of conditional text per line, it is not nestable, and not multiline either.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcomboom%2Fautosite-legacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotcomboom%2Fautosite-legacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcomboom%2Fautosite-legacy/lists"}