Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Almoststatic is a static sites and web pages generator engine written in Python which utilizes the Jinja2 template system to render pages. It can be integrated with Flask apps to serve static contents on dynamic sites or used standalone for static sites development.
Pages are declared in YAML files and rendered with Jinja2 template files. The HTML contents can be written in Markdown markup language or in plain HTML. The “content” folder contains all data needed to do the job, and the “config.yaml” is used to share global parameters and to set up configuration.
It is loosely inspired by Hugo static site generator, but it differs in many ways.
There are many static site generators such as Next.js, Hugo or Jekyll, but you can prefer Almostatic because:
The simplest way to see if Almoststatic is what you're looking for, is to try the sample provided with source code package and explore the source code.
The following tutorial is tested on Linux Ubuntu, but it's easy to port on other platforms such other Linux distros, Windows or Mac.
You need git and python3, install them with:
$ sudo apt install git python3
Last linux's releases comes with python3 already installed and you have only to check if your version is 3.6 or higher:
$ python3 --version
Now clone Almoststatic with git and enter into the directory:
$ git clone https://gitlab.com/claudio.driussi/almoststatic.git
$ cd almoststatic
It's common in python using virtualenv for development, to do so and to install Almoststatic, write:
$ python3 -m venv myvenv
$ source myvenv/bin/activate
$ pip install almoststatic
$ pip install pyftpsync
Done! Now you can try the sample, cd into sample directory and run flaskapp.py:
$ cd sample/
$ python flaskapp.py
A local host Flask App instance server is executed and you can test Almoststatic features.
Open your browser and copy and paste the following URL: http://127.0.0.1:5000/
or localhost:5000
You will be redirected to the static site showing some widgets and feature of Almostatic, you can navigate to see some examples.
You can always exit from server pressing CTRL-C on your terminal.
To build static site run:
$ python write_static.py
$ ls -l ../_static_site/
As you can see, your pages are written as *.html files, but this is not enough to get a really static site, to do this you have to tune writing parameters and copy media files on appropriate location. When you are done the site can be published as static site.
If you wish, you can run tests:
$ cd ../test
$ python as_test.py
This do some tests and write a simpler static site.
Now if you decide that Almoststatic is right for you, you can dig into source code of sample and tests and read the documentation at: https://almoststatic.readthedocs.io
Almoststatic is young but stable! It has all planned features and always gave me the right results so it can be considered "production ready"
At the moment there are only a few themes, we are developing a "rolling theme" with some beautiful widgets ready to use. See Flatstep theme and follow the tutorial.
I'm not a designer so the result is of average quality. But I'm sure that good designers can write great themes.
If you appreciate Almoststatic, you can make a donation via PayPal
FAQs
Use Jinja2 template system to build static pages with Flask integration
We found that almoststatic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.