aqui-brain-dump


Nameaqui-brain-dump JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryCreate a static website based on notes from a digital garden
upload_time2023-06-29 14:13:05
maintainer
docs_urlNone
authorAquiles Carattino
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Static Website Builder

This is a very simple static website builder, which I use for building [aquiles.me](https://www.aquiles.me). The idea is to grab a bunch of markdown files and render them as HTML files. 

Building from scratch was easier than trying to adjust existing solutions to my own needs. I a releasing this package mostly to help others learn. 

The template was built using TalwindCSS, and is processed with PostCSS to make it minimal (11kb without compressing). 

## Entry Point
The program can be triggered by running the following command:

```bash
$ brain_dump
```

It assumes the following:

* Content Folder: ``content``
* Template Folder: ``templates``
* Static Folder: ``static``
* Output Folder: ``output``

You can see the [main function](https://github.com/aquilesC/static_website_builder/blob/master/aqui_brain_dump/main.py) to understand what it does.

## Core Ideas
I built this static generator so that small notes can quickly find their way online, lowering my barrier to pushing content to a website. Therefore, it all revolves around using plain markdown files (I author them using Obsidian), and compiling using two simple templates: one for the index page and one for each note/article. 

Each note that ends with ``.md`` will be transformed into a folder such as as ``/note/index.html`` and spaces will be transformed to underscores. 

!! warning
    I am not dealing with non-ascii characters in any way, which is a problem for URL's

Each note can have internal links, in which I use the wikilink syntax: ``[[ ]]``. Each link is then appended to the target page, so that lists of backlinks can be built. I find the idea of backlinks crucial for lowering the barrier, since new content can be automatically be shown on older content. 

Also, links to non-existing pages will force the creation of an 'empty' node that only displays backlinks. 

## Extra Markdown
There are some custom solutions embedded into the program. For example, wikilinks parse the presence of ``|`` as a separator for the href. In this way, ``[[target|link]]`` will show up as ``link`` but will be targeted at ``target``. The wikilinks also remove all the spaces and transform them to underscores to be consistent with how I deal with URL's. 

The frontmatter is separated using an initial ``---`` and final ``---``. The keyowrds used for the moment are: ``title`` and ``description``, which are used for the meta tags of the html, ``epistemic``, which adds a note at the top of each article to display the [epistemic status](https://www.aquiles.me/epistemic_status). Other fields are accepted but are not currently used when generating content.

I also make use of ``admonition`` to include images of different widths. The ``style.css`` defines two types of images: medium and small that can be used by inserting something like this in the markdown file:

    !!! image small
	    ![Aquiles Carattino](/Aquiles_Carattino.jpg) 

## Git-based creation and modification dates
Since my working flow is based on git, I use it to compute the creation and modification dates of each file. It is not super accurate, since it measures the moment a file was added to git and not really created on the computer. Normally the offset is lower than a day. This approach seems to give more consistent results than using the operating system's dates, and is compatible with Netlify. 

You can read more on my [about page](https://www.aquiles.me/about).

## License
The code is released under BSD 3 Clause License. See LICENSE for more information. You are free to use and re-distribute, provided that you aknowledge my work. Seems fair enough. 

Of course, if you are trying to learn from the program, or building on it, don't hesitate to reach out at **hey@aquiles.me** 
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aqui-brain-dump",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Aquiles Carattino",
    "author_email": "aqui.carattino@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/22/d2/9c36fe79c78255b6eeededb9d7aee124f7b950083ed1443f943c7004447d/aqui_brain_dump-0.1.2.tar.gz",
    "platform": null,
    "description": "# Static Website Builder\n\nThis is a very simple static website builder, which I use for building [aquiles.me](https://www.aquiles.me). The idea is to grab a bunch of markdown files and render them as HTML files. \n\nBuilding from scratch was easier than trying to adjust existing solutions to my own needs. I a releasing this package mostly to help others learn. \n\nThe template was built using TalwindCSS, and is processed with PostCSS to make it minimal (11kb without compressing). \n\n## Entry Point\nThe program can be triggered by running the following command:\n\n```bash\n$ brain_dump\n```\n\nIt assumes the following:\n\n* Content Folder: ``content``\n* Template Folder: ``templates``\n* Static Folder: ``static``\n* Output Folder: ``output``\n\nYou can see the [main function](https://github.com/aquilesC/static_website_builder/blob/master/aqui_brain_dump/main.py) to understand what it does.\n\n## Core Ideas\nI built this static generator so that small notes can quickly find their way online, lowering my barrier to pushing content to a website. Therefore, it all revolves around using plain markdown files (I author them using Obsidian), and compiling using two simple templates: one for the index page and one for each note/article. \n\nEach note that ends with ``.md`` will be transformed into a folder such as as ``/note/index.html`` and spaces will be transformed to underscores. \n\n!! warning\n    I am not dealing with non-ascii characters in any way, which is a problem for URL's\n\nEach note can have internal links, in which I use the wikilink syntax: ``[[ ]]``. Each link is then appended to the target page, so that lists of backlinks can be built. I find the idea of backlinks crucial for lowering the barrier, since new content can be automatically be shown on older content. \n\nAlso, links to non-existing pages will force the creation of an 'empty' node that only displays backlinks. \n\n## Extra Markdown\nThere are some custom solutions embedded into the program. For example, wikilinks parse the presence of ``|`` as a separator for the href. In this way, ``[[target|link]]`` will show up as ``link`` but will be targeted at ``target``. The wikilinks also remove all the spaces and transform them to underscores to be consistent with how I deal with URL's. \n\nThe frontmatter is separated using an initial ``---`` and final ``---``. The keyowrds used for the moment are: ``title`` and ``description``, which are used for the meta tags of the html, ``epistemic``, which adds a note at the top of each article to display the [epistemic status](https://www.aquiles.me/epistemic_status). Other fields are accepted but are not currently used when generating content.\n\nI also make use of ``admonition`` to include images of different widths. The ``style.css`` defines two types of images: medium and small that can be used by inserting something like this in the markdown file:\n\n    !!! image small\n\t    ![Aquiles Carattino](/Aquiles_Carattino.jpg) \n\n## Git-based creation and modification dates\nSince my working flow is based on git, I use it to compute the creation and modification dates of each file. It is not super accurate, since it measures the moment a file was added to git and not really created on the computer. Normally the offset is lower than a day. This approach seems to give more consistent results than using the operating system's dates, and is compatible with Netlify. \n\nYou can read more on my [about page](https://www.aquiles.me/about).\n\n## License\nThe code is released under BSD 3 Clause License. See LICENSE for more information. You are free to use and re-distribute, provided that you aknowledge my work. Seems fair enough. \n\nOf course, if you are trying to learn from the program, or building on it, don't hesitate to reach out at **hey@aquiles.me** ",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create a static website based on notes from a digital garden",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "094cbfde7220a74ea150bb76d4b01aefc9edf1c9b37d4632d378a78985b129c3",
                "md5": "923d3401dea5d757a538a918aa71b396",
                "sha256": "ca2aafd8b33a6ed08381d8261f40683519423f14677f9665ae53c0c2c09e8f21"
            },
            "downloads": -1,
            "filename": "aqui_brain_dump-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "923d3401dea5d757a538a918aa71b396",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 19394,
            "upload_time": "2023-06-29T14:13:03",
            "upload_time_iso_8601": "2023-06-29T14:13:03.319516Z",
            "url": "https://files.pythonhosted.org/packages/09/4c/bfde7220a74ea150bb76d4b01aefc9edf1c9b37d4632d378a78985b129c3/aqui_brain_dump-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22d29c36fe79c78255b6eeededb9d7aee124f7b950083ed1443f943c7004447d",
                "md5": "e2c0aa54c71e856cfef97373a63ee1f1",
                "sha256": "f752c0261f43602c9ccb046fad243bf6d81860e75e60d84c2a3b976702aad612"
            },
            "downloads": -1,
            "filename": "aqui_brain_dump-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e2c0aa54c71e856cfef97373a63ee1f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 15360,
            "upload_time": "2023-06-29T14:13:05",
            "upload_time_iso_8601": "2023-06-29T14:13:05.343956Z",
            "url": "https://files.pythonhosted.org/packages/22/d2/9c36fe79c78255b6eeededb9d7aee124f7b950083ed1443f943c7004447d/aqui_brain_dump-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-29 14:13:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aqui-brain-dump"
}
        
Elapsed time: 0.24274s