{"id":16444981,"url":"https://github.com/jaymon/bang","last_synced_at":"2025-03-16T17:36:47.232Z","repository":{"id":13171080,"uuid":"15854146","full_name":"Jaymon/bang","owner":"Jaymon","description":"A static site generator with support for RSS feeds, sitemaps, and Google Amp","archived":false,"fork":false,"pushed_at":"2024-04-13T23:31:50.000Z","size":430,"stargazers_count":12,"open_issues_count":20,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-16T19:00:16.076Z","etag":null,"topics":["blog","blog-engine","html","markdown","python","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jaymon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-13T00:39:42.000Z","updated_at":"2024-05-02T23:03:58.066Z","dependencies_parsed_at":"2024-05-02T23:03:53.786Z","dependency_job_id":"45b42a50-0df8-4feb-b014-a085b53ea9a8","html_url":"https://github.com/Jaymon/bang","commit_stats":{"total_commits":121,"total_committers":2,"mean_commits":60.5,"dds":0.008264462809917328,"last_synced_commit":"1e24c973ea197db9dc794758a649fa3190a31754"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fbang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fbang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fbang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fbang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaymon","download_url":"https://codeload.github.com/Jaymon/bang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823693,"owners_count":20353715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blog","blog-engine","html","markdown","python","static-site","static-site-generator"],"created_at":"2024-10-11T09:42:50.251Z","updated_at":"2025-03-16T17:36:46.898Z","avatar_url":"https://github.com/Jaymon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bang\n\nA static site generator built in Python with support for things like sitemaps, Open Graph, RSS feeds, and Google Amp. Powers [marcyes.com](http://marcyes.com)\n\nYou run bang from the command line:\n\n    $ bang \u003cCOMMAND\u003e --project-dir=...\n\n[Documentation](https://github.com/Jaymon/bang/tree/master/docs)\n\n-------------------------------------------------------------------------------\n\n## Installation\n\nUse pip:\n\n    pip install bangtext\n\n-------------------------------------------------------------------------------\n\n## 1 minute getting started\n\nFirst, install bang:\n\n    $ pip install bangtext\n\nMake a new project:\n\n    $ bang generate --project-dir=~/bang-quickstart\n\nThen compile your new project:\n\n    $ bang compile --project-dir=~/bang-quickstart\n\nAnd start up the development server to take a look at your new project:\n\n    $ bang serve --project-dir=~/bang-quickstart\n\nNow, open a browser and load `localhost:8000` to see your masterpiece, that's it!\n\n-------------------------------------------------------------------------------\n\n## Setup and Configuration\n\nA bang project will check each folder in the project directory for an `page.md` markdown file, if it finds one it will compile it to an `index.html` file. \n\nSo, if you have this file structure in your `project-dir`:\n\n    project-dir/\n      input/\n        foo/\n        \tpage.md\n        \timage.png\n        bar/\n        \tpage.md\n\nWould compile down to this file structure:\n\n    project-dir/\n      output/\n        foo/\n        \tindex.html\n        \timage.png\n        bar/\n        \tindex.html\n\nSo it would have urls like:\n\n\thttp://host.tld/foo/\n\thttp://host.tld/bar/\n\n\n### Plugins\n\nYou activate [plugins](https://github.com/Jaymon/bang/blob/master/docs/PLUGINS.md) by importing them into your [project's bangfile](https://github.com/Jaymon/bang/blob/master/docs/CONFIGURATION.md).\n\nYou can customize your project to your needs, like turning it into a blog, adding Google Amp support, and things like that.\n\n\n### Project Directory\n\nYour project directory is where all the magic happens.\n\n#### Structure\n\n\n##### input directory (required)\n\nThis is where everything you want to be in the final output folder should go, this is where you would place your markdown files and any other files/folders you want your *live* static site to contain.\n\n\n##### themes directory (optional)\n\nWhat your site looks like. Read more about [themes](https://github.com/Jaymon/bang/blob/master/docs/THEMES.md) and how to create your own.\n\n\n##### output directory (optional)\n\nThis is the default output directory when the `compile` command is used with no `--output-dir` argument.\n\n\n##### bangfile.py (optional)\n\nYou can add a [bangfile](https://github.com/Jaymon/bang/blob/master/docs/CONFIGURATION.md) to configure your project.\n\n\n-------------------------------------------------------------------------------\n\n## Commands\n\n### compile\n\nUse this to compile your `project-dir/input` directory to the final form in the `output-dir` directory.\n\nCompile your site using the default output directory:\n\n    $ bang compile --project-dir=...\n\nThat will place the compiled output to `project-dir/output`, you can also move the output directory to another location:\n\n    $ bang compile --project-dir=... --output-dir=...\n\n\n### serve\n\nUse this to fire up a local server so you can see your compiled site. You can set the port with the `--port` flag.\n\n    $ bang server --project-dir=... --port=8000\n\n\n### watch\n\nThis is designed to be used on the remote server that will host your site in a cron job, it will try and pull down the code using a git repo, if there are changes, then it will compile the new changes, since it is run in cron, you should include the full path:\n\n    $ /usr/local/bin/bang watch --project-dir=...\n\n\n### generate\n\nGenerate a site skeleton that you can use as a starting point to your own bang site, this will take the `project_dir` and make sure it exists (or create it) and then copy over the [default project](https://github.com/Jaymon/bang/tree/master/bang/data/project) structure.\n\n    $ bang generate --project-dir=...\n\n\n-------------------------------------------------------------------------------\n\n## Testing\n\nIf you cloned this repo, you can test out bang by running (from the repo working directory:\n\n    $ python -m bang generate -d /path/to/testsite/\n    $ python -m bang compile -d /path/to/testsite/\n    $ python -m bang serve -d /path/to/testsite/\n\nYou can also run the unit tests:\n\n    $ python -m unittest bang_test\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymon%2Fbang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaymon%2Fbang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymon%2Fbang/lists"}