Skip to main content
FSS, Flask-Static-Site
==============================================================================
Flask-Static-Site is designed to compile **Jinja2** templates into static web
webpages for static hosting like Amazon AWS S3 and Github Pages.

It also provides a simple development server via **Flask microframework**.


Installation
------------------------------------------------------------------------------
Just `pip install fss`


Layout
------------------------------------------------------------------------------
By default, FSS works with files put as following layout:
```
*--- STATIC-SITE-ROOT // The root folder of your static site.
|
+--- fss_settings.py // Settings file for FSS
|
+--- static // Static files of this site (Default)
| +--- index.css
| +--- index.js
|
+--- templates // Jinja templates of this site (Default)
+--- index.jinja
+--- _temp.jinja
+--- about
+--- developer.jinja
+--- designer.jinja
```
FSS compiles above project structure into following layout:
```
*--- STATIC-SITE-ROOT // The root folder of your static site.
|
+--- fss_settings.py // Settings file for FSS
|
+--- static // Static files of this site
| +--- index.css
| +--- index.js
|
+--- templates // Jinja templates of this site
| +--- index.jinja
| +--- _temp.jinja
| +--- about
| +--- developer.jinja
| +--- designer.jinja
|
+--- index.html // Static html files that static-website can access
+--- about
+--- developer.html
+--- designer.html
```
FSS finds all **Jinja2 templates** in the `templates` folder, compiles it
into html pages, and puts built result at root directory. *(Templates named with a prefix "\_" won't be compiled)*.


Settings (fss_settings.py)
------------------------------------------------------------------------------
When running `fss` command, `fss` finds `fss_settings.py` in current working
directory. It loads the python module and update settings.
The default settings are:
```python
cwd = os.getcwd()
static_folder = 'static'
templates_folder = 'templates'
templates_context = {}
output_folder = '.'
flask_app_config = {}
```

- **static_folder**
A folder where to find static files when running a flask dev server and compiling.
By default, it uses `static` folder under current working directory.

- **templates_folder**
A folder where to find Jinja2 templates when running a flask dev server and compiling.
By default, it uses `templates` folder under current working directory.

- **templates_context**
Context for rendering Jinja2 templates

- **output_folder**
A folder here to put compiled result.
By default, it put result in the current working directory.

- **flask_app_config**
An extra dict used to setup Flask app.



Requirements
------------------------------------------------------------------------------
We use **Flask**, **Jinja2**, and **Frozen-Flask**. Check `requirements.txt`.


Commands
------------------------------------------------------------------------------
* `fss dev_server`
Start a local development server at http://localhost:5000 via Flask.

* `fss build`
Compile (render) Jinja2 templates into static html files.


License
------------------------------------------------------------------------------
Copyright 2013 Wantoto Inc http://www.wantoto.com/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Metadata

Release files for fss 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fss 0.2.1
File Size Uploaded Provenance
fss-0.2.1.tar.gz 3.7 kB Without provenance Details

Release files / fss-0.2.1.tar.gz

Download URL fss-0.2.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7943e1aa25ebe3fadb13e7285d3846c478e03ec5e29689476e22917327fade95
BLAKE2b-256 checksum
How to use checksums
e0a0c415409be9c1292c8fa4dce0c250462fa2199e4d2c79e7895bcc8e24b61f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fss 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page