almoststatic


Namealmoststatic JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://gitlab.com/claudio.driussi/almoststatic
SummaryUse Jinja2 template system to build static pages with Flask integration
upload_time2023-08-15 07:17:33
maintainer
docs_urlNone
authorClaudio driussi
requires_python>=3.6
licenseLGPL
keywords flask static web "static pages" "static sites" html
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Almoststatic

**Almoststatic** is a static sites and web pages generator engine written in
[Python](https://python.org) which uses the
[Jinja2 template system](https://jinja.palletsprojects.com) to render pages.
It can be integrated with [Flask](https://flask.palletsprojects.com) apps to
serve static contents on dynamic sites or can be used stand alone for static
sites development.

Pages are declared in [yaml](https://yaml.org/) files and rendered with Jinja2
template files, the html contents can be written in [markdown](https://www.markdownguide.org/)
markup language or in plain html. "content" folder contains all data needed to
do the job, the "config.yaml" is used to share global parameters and to setup
configuration.

It is roughly inspired by [hugo](https://gohugo.io/) static site generator,
but it differs in many ways.

# Why Almoststatic?

There are many static site generators such as [Next.js](https://nextjs.org/),
[Hugo](https://gohugo.io/) or [Jekyll](https://jekyllrb.com/), but you can
prefer Almostatic because:

- **It's perfect for pythonist.** It uses Jinja2 and Flask which are widely
  used by python community, so you don\'t need to learn other programming
  languages or template engines.
- **It's easy!** In fact the rules are very few and this mean few things to
  learn and great flexibility.
- **It's versatile.** It's engine has a powerful recursive system for embedding
  and including contents. This helps you to build rich contents and also to
  split them in small pieces called *"widgets"* easier to maintain.
- **It has blog capabilities.** Contain functions used to query metadata info
  useful to organize blog pages by categories and tags.
- **You can deliver static and dynamic contents at same time.** With Flask you
  can build your dynamic content and let Almoststatic to render the rest of
  page or the whole page, if it is full static.
- **Write static sites.** Static sites are composed only by text files and media
  contents. They are easy to deliver on the web, are secure by design, require
  less maintenance and resources and are faster. If you have no need for dynamic
  contents, with **Almoststatic** you can write all pages as static.
- **Not only for pythonists.** Basic knowledge of python is needed, but once
  your developer environment is ready, Almoststatic lets you to focus on
  writing yaml and karkdown\'s contents and to create your own widgets in html
  and Jinja2.

# Quick start

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:
```bash
$ 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:

```bash
$ python3 --version
```

Now clone Almoststatic with git and enter into the directory:

```bash
$ 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:

```bash
$ 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:

```bash
$ 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:

```bash
$ 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:

```bash
$ 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](https://almoststatic.readthedocs.io)

# Status of project

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](https://gitlab.com/almoststatic-themes/flatstep)
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.


# Donate

If you appreciate Almoststatic, you can make a donation via PayPal

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?hosted_button_id=JYJ6EMFY7YWJQ)

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/claudio.driussi/almoststatic",
    "name": "almoststatic",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Flask,static,web,\"static pages\",\"static sites\",html",
    "author": "Claudio driussi",
    "author_email": "claudio.driussi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/cb/19a70f0b2b79460d1c4f60e211490beb147dd75264b5948dd82a81e082c7/almoststatic-1.0.4.tar.gz",
    "platform": "any",
    "description": "# Almoststatic\n\n**Almoststatic** is a static sites and web pages generator engine written in\n[Python](https://python.org) which uses the\n[Jinja2 template system](https://jinja.palletsprojects.com) to render pages.\nIt can be integrated with [Flask](https://flask.palletsprojects.com) apps to\nserve static contents on dynamic sites or can be used stand alone for static\nsites development.\n\nPages are declared in [yaml](https://yaml.org/) files and rendered with Jinja2\ntemplate files, the html contents can be written in [markdown](https://www.markdownguide.org/)\nmarkup language or in plain html. \"content\" folder contains all data needed to\ndo the job, the \"config.yaml\" is used to share global parameters and to setup\nconfiguration.\n\nIt is roughly inspired by [hugo](https://gohugo.io/) static site generator,\nbut it differs in many ways.\n\n# Why Almoststatic?\n\nThere are many static site generators such as [Next.js](https://nextjs.org/),\n[Hugo](https://gohugo.io/) or [Jekyll](https://jekyllrb.com/), but you can\nprefer Almostatic because:\n\n- **It's perfect for pythonist.** It uses Jinja2 and Flask which are widely\n  used by python community, so you don\\'t need to learn other programming\n  languages or template engines.\n- **It's easy!** In fact the rules are very few and this mean few things to\n  learn and great flexibility.\n- **It's versatile.** It's engine has a powerful recursive system for embedding\n  and including contents. This helps you to build rich contents and also to\n  split them in small pieces called *\"widgets\"* easier to maintain.\n- **It has blog capabilities.** Contain functions used to query metadata info\n  useful to organize blog pages by categories and tags.\n- **You can deliver static and dynamic contents at same time.** With Flask you\n  can build your dynamic content and let Almoststatic to render the rest of\n  page or the whole page, if it is full static.\n- **Write static sites.** Static sites are composed only by text files and media\n  contents. They are easy to deliver on the web, are secure by design, require\n  less maintenance and resources and are faster. If you have no need for dynamic\n  contents, with **Almoststatic** you can write all pages as static.\n- **Not only for pythonists.** Basic knowledge of python is needed, but once\n  your developer environment is ready, Almoststatic lets you to focus on\n  writing yaml and karkdown\\'s contents and to create your own widgets in html\n  and Jinja2.\n\n# Quick start\n\nThe simplest way to see if **Almoststatic** is what you're looking for, is to\ntry the sample provided with source code package and explore the source code.\n\nThe following tutorial is tested on Linux Ubuntu, but it's easy to port on\nother platforms such other Linux distros, Windows or Mac.\n\nYou need git and python3, install them with:\n```bash\n$ sudo apt install git python3\n```\nLast linux's releases comes with python3 already installed and you have only to\ncheck if your version is 3.6 or higher:\n\n```bash\n$ python3 --version\n```\n\nNow clone Almoststatic with git and enter into the directory:\n\n```bash\n$ git clone https://gitlab.com/claudio.driussi/almoststatic.git\n$ cd almoststatic\n```\nIt's common in python using virtualenv for development, to do so and to install\nAlmoststatic, write:\n\n```bash\n$ python3 -m venv myvenv\n$ source myvenv/bin/activate\n$ pip install almoststatic\n$ pip install pyftpsync\n```\n\nDone! Now you can try the sample, cd into sample directory and run flaskapp.py:\n\n```bash\n$ cd sample/\n$ python flaskapp.py\n```\n\nA local host Flask App instance server is executed and you can test\nAlmoststatic features.\n\nOpen your browser and copy and paste the following URL: `http://127.0.0.1:5000/`\nor `localhost:5000`\n\nYou will be redirected to the static site showing some widgets and feature\nof Almostatic, you can navigate to see some examples.\n\nYou can always exit from server pressing CTRL-C on your terminal.\n\nTo build static site run:\n\n```bash\n$ python write_static.py\n$ ls -l ../_static_site/\n```\nAs you can see, your pages are written as *.html files, but this is not enough\nto get a really static site, to do this you have to tune writing parameters and\ncopy media files on appropriate location. When you are done the site can be\npublished as static site.\n\nIf you wish, you can run tests:\n\n```bash\n$ cd ../test\n$ python as_test.py\n```\nThis do some tests and write a simpler static site.\n\nNow if you decide that **Almoststatic** is right for you, you can dig into\nsource code of sample and tests and read the documentation at:\n[https://almoststatic.readthedocs.io](https://almoststatic.readthedocs.io)\n\n# Status of project\n\nAlmoststatic is young but stable! It has all planned features and always gave me\nthe right results so it can be considered \"production ready\"\n\nAt the moment there are only a few themes, we are developing a \"rolling theme\"\nwith some beautiful widgets ready to use.\nSee [Flatstep theme](https://gitlab.com/almoststatic-themes/flatstep)\nand follow the tutorial.\n\nI'm not a designer so the result is of average quality. But I'm sure that good\ndesigners can write great themes.\n\n\n# Donate\n\nIf you appreciate Almoststatic, you can make a donation via PayPal\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?hosted_button_id=JYJ6EMFY7YWJQ)\n",
    "bugtrack_url": null,
    "license": "LGPL",
    "summary": "Use Jinja2 template system to build static pages with Flask integration",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://gitlab.com/claudio.driussi/almoststatic"
    },
    "split_keywords": [
        "flask",
        "static",
        "web",
        "\"static pages\"",
        "\"static sites\"",
        "html"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23c84b2bd4c986012f655429711eef25eabf8e599fa476b6c3d72f1c6e152524",
                "md5": "d3d76d9bea4d622118d5641c23784f79",
                "sha256": "dd0a0c7ec6a6bc6378384ec26d1f4d44c1dbe314c0740fd1d7a869b9728a3837"
            },
            "downloads": -1,
            "filename": "almoststatic-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3d76d9bea4d622118d5641c23784f79",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14871,
            "upload_time": "2023-08-15T07:17:31",
            "upload_time_iso_8601": "2023-08-15T07:17:31.175555Z",
            "url": "https://files.pythonhosted.org/packages/23/c8/4b2bd4c986012f655429711eef25eabf8e599fa476b6c3d72f1c6e152524/almoststatic-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ccb19a70f0b2b79460d1c4f60e211490beb147dd75264b5948dd82a81e082c7",
                "md5": "1ccd1e0b293187f957ac874d09bc01eb",
                "sha256": "28741bc8118f84cebca899ff8abaceffc75bb877f2274c834905c931887f932c"
            },
            "downloads": -1,
            "filename": "almoststatic-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1ccd1e0b293187f957ac874d09bc01eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17040,
            "upload_time": "2023-08-15T07:17:33",
            "upload_time_iso_8601": "2023-08-15T07:17:33.354161Z",
            "url": "https://files.pythonhosted.org/packages/8c/cb/19a70f0b2b79460d1c4f60e211490beb147dd75264b5948dd82a81e082c7/almoststatic-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-15 07:17:33",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "claudio.driussi",
    "gitlab_project": "almoststatic",
    "lcname": "almoststatic"
}
        
Elapsed time: 0.11231s