{"id":13449358,"url":"https://github.com/thanethomson/statik","last_synced_at":"2025-09-18T21:31:29.552Z","repository":{"id":7960884,"uuid":"56786535","full_name":"thanethomson/statik","owner":"thanethomson","description":"Multi-purpose static web site generator aimed at developers.","archived":false,"fork":false,"pushed_at":"2022-03-29T21:55:38.000Z","size":558,"stargazers_count":259,"open_issues_count":38,"forks_count":31,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-01-04T18:10:04.568Z","etag":null,"topics":["command-line","jinja2","library","mustache","python","sqlalchemy","static-site-generator"],"latest_commit_sha":null,"homepage":"https://getstatik.com","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/thanethomson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-21T15:46:42.000Z","updated_at":"2024-11-29T18:46:39.000Z","dependencies_parsed_at":"2022-08-06T20:15:23.815Z","dependency_job_id":null,"html_url":"https://github.com/thanethomson/statik","commit_stats":null,"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanethomson%2Fstatik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanethomson%2Fstatik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanethomson%2Fstatik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanethomson%2Fstatik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanethomson","download_url":"https://codeload.github.com/thanethomson/statik/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233524226,"owners_count":18689082,"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":["command-line","jinja2","library","mustache","python","sqlalchemy","static-site-generator"],"created_at":"2024-07-31T06:00:36.301Z","updated_at":"2025-09-18T21:31:24.202Z","avatar_url":"https://github.com/thanethomson.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Statik\n\n[![Build Status](https://travis-ci.org/thanethomson/statik.svg?branch=master)](https://travis-ci.org/thanethomson/statik)\n[![PyPI](https://img.shields.io/pypi/v/statik.svg)](https://pypi.python.org/pypi/statik)\n[![PyPI](https://img.shields.io/pypi/pyversions/statik.svg)](https://pypi.python.org/pypi/statik)\n\n*NOTE: I haven't had time in years to maintain this project. If someone wants\nto take it over, please fork it and let me know and I'll add a link to your\nfork in the README here.*\n\n## Overview\n**Statik** aims to be a simple, yet powerful, generic static web site generator.\nInstead of forcing you to adhere to a particular data structure/model (like the\nstandard blog data model, with posts, pages and tags), **Statik** allows you to\ndefine your own data models in YAML format, and instances of those data models\neither in YAML or Markdown. This is all loaded into an in-memory\n[SQLAlchemy](http://www.sqlalchemy.org/) SQLite database when rendering your\n*views*.\n\nThen, code up your templates using the [Jinja2](http://jinja.pocoo.org/)\ntemplating engine (very similar to the Django templating engine), or\n[Mustache](http://mustache.github.io/) templates.\n\nFinally, define your *views* (either complex or simple) in YAML format, telling\n**Statik** how to render your data and templates to specific URLs for your shiny\nnew static web site. Write queries for your views in SQLAlchemy's [ORM\nsyntax](http://docs.sqlalchemy.org/en/rel_1_0/orm/tutorial.html), or\n[MLAlchemy](https://github.com/thanethomson/MLAlchemy) to make your life easier.\n\nSee the [wiki](https://github.com/thanethomson/statik/wiki) for more details.\n\n## Requirements\nIn order to install **Statik**, you will need:\n\n* Python 3.6+\n* `pip` or `easy_install`\n\n## Installation\nSimply run the following:\n\n```bash\n\u003e pip install statik\n```\nTo upgrade, just run the following:\n\n```bash\n\u003e pip install --upgrade statik\n```\n\n## Usage\nTo build the project in the current directory, writing output files to the\n`public` directory within the current directory:\n\n```bash\n\u003e statik\n```\n\nTo build a project in another directory, writing output files to the `public`\ndirectory within *that* directory:\n\n```bash\n\u003e statik -p /path/to/project/folder\n```\n\nTo build a project in another directory, with control over where to place the\noutput files:\n\n```bash\n\u003e statik -p /path/to/project/folder -o /path/to/output/folder\n```\n\n## Project QuickStart\nTo create an empty project folder with the required project structure, simply\nrun:\n\n```bash\n\u003e statik -p /path/to/project/ --quickstart\n```\n\n## Statik Projects\nA **Statik** project must adhere to the directory structure as follows:\n\n```\nconfig.yml    - YAML configuration file for the overall project.\nassets/       - Static assets for the project (images, CSS files,\n                scripts, etc.). Ignored if themes are used.\ndata/         - Instances for each of the different models, defined either in\n                YAML or Markdown format.\nmodels/       - A folder specifically dedicated to model definitions, in YAML\n                format.\ntemplates/    - Jinja2/Mustache template files. Ignored if themes are used.\ntemplatetags/ - Python scripts defining custom Jinja2 template tags and\n                filters.\nthemes/       - If your project uses themes, place them here. Each theme\n                must be uniquely named, and must contain an \"assets\"\n                and \"templates\" folder.\nviews/        - Configuration files, in YAML format, defining \"recipes\" for how\n                to generate various different URLs (which models to use, which\n                data and which templates).\n```\n\nFor example projects, see the `examples` directory in the source repository.\nFor more information, see the\n[wiki](https://github.com/thanethomson/statik/wiki).\n\n## Themes\nThemes for **Statik** will slowly start appearing in the [Statik\nThemes](https://github.com/thanethomson/statik-themes) repository. Watch that\nspace!\n\n## Remote upload\n**Statik** can publish your generated site for you through SFTP or through\n[Netlify](https://netlify.com).\n\n### SFTP\n\nTo publish your website via SFTP, you can configure certain values by way of\nconfiguration file or environment variable-based options. Some sensitive\noptions, however, must be configured exclusively by way of environment\nvariables.\n\nFor your configuration file:\n\n```yaml\ndeploy:\n  sftp:\n    host: your-server.com\n    dest-path: /folder/on/your/server/\n    user: youruserforyourserver\n\n    # you can also optionally specify which SSH private key to use\n    key-file: ~/.ssh/my-private-key\n\n    # optionally specify SFTP port (default: 22)\n    port: 2222\n```\n\nSet up your sensitive environment variables prior to running Statik:\n\n```bash\n# If your server requires password-based authentication\n\u003e export SFTP_PASSWORD=mysftppassword\n\n# If your SSH key file is encrypted and it requires a password to decrypt\n\u003e export SFTP_KEY_FILE_PASSWORD=mysftpkeyfilepassword\n```\n\nAlternatively, you could set up all SFTP variables through environment variables\nalone:\n\n```bash\n\u003e export SFTP_HOST=your-server.com\n\u003e export SFTP_PORT=2222                  # optionally set SFTP port\n\u003e export SFTP_DEST_PATH=/folder/on/your/server\n\u003e export SFTP_USER=youruserforyourserver\n\u003e export SFTP_PASSWORD=mysftppassword\n\u003e export SFTP_KEY_FILE=~/.ssh/my-private-key\n\u003e export SFTP_KEY_FILE_PASSWORD=mysftpkeyfilepassword\n```\n\nThen run Statik using the following deployment command:\n\n```bash\n\u003e statik --deploy sftp\n```\n\nFor troubleshooting SFTP connections, run this using the `-v` flag to increase\noutput verbosity:\n\n```bash\n\u003e statik --deploy sftp -v\n```\n\n### Netlify\n\nTo publish your website via Netlify, you will need 2 things: your Netlify access\ntoken and your Netlify site ID.\n\nFirst, specify your access token and site ID as environment variables:\n\nLinux:\n\n```bash\n\u003e export NETLIFY_AUTH_TOKEN=\u003cnetlify_token\u003e\n\u003e export NETLIFY_SITE_ID=\u003cnetlify_site_id\u003e\n```\n\nWindows\n\n```bash\n\u003e set NETLIFY_AUTH_TOKEN=\u003cnetlify_token\u003e\n\u003e set NETLIFY_SITE_ID=\u003cnetlify_site_id\u003e\n```\n\nThen, run **Statik** by passing in `--deploy=netlify`.\n\n```bash\nstatik --deploy netlify\n```\n**Statik** will upload the static site that it outputs.\n\n## License\n**The MIT License (MIT)**\n\nCopyright (c) 2016-2019 Thane Thomson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanethomson%2Fstatik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanethomson%2Fstatik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanethomson%2Fstatik/lists"}