forked from github.com/blag
small fixed to blag quickstart
This commit is contained in:
@@ -30,6 +30,10 @@
|
|||||||
* blag comes now with a simple yet good looking default theme that supports
|
* blag comes now with a simple yet good looking default theme that supports
|
||||||
syntax highlighting and a light- and dark theme.
|
syntax highlighting and a light- and dark theme.
|
||||||
|
|
||||||
|
* apart from the generated configuration, `blag quickstart` will now also
|
||||||
|
create the initial directory structure, with the default template, the static
|
||||||
|
directory with the CSS files and the content directory with some initial
|
||||||
|
content to get the user started
|
||||||
|
|
||||||
## [1.5.0] - 2023-04-16
|
## [1.5.0] - 2023-04-16
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Write content in [Markdown][]
|
* Write content in [Markdown][]
|
||||||
|
* Good looking default theme
|
||||||
* Theming support using [Jinja2][] templates
|
* Theming support using [Jinja2][] templates
|
||||||
* Generation of Atom feeds for blog content
|
* Generation of Atom feeds for blog content
|
||||||
* Fenced code blocks and syntax highlighting using [Pygments][]
|
* Fenced code blocks and syntax highlighting using [Pygments][]
|
||||||
|
|||||||
@@ -61,8 +61,9 @@ def copy_default_theme() -> None:
|
|||||||
def quickstart(args: argparse.Namespace | None) -> None:
|
def quickstart(args: argparse.Namespace | None) -> None:
|
||||||
"""Quickstart.
|
"""Quickstart.
|
||||||
|
|
||||||
This method asks the user some questions and generates a
|
This method asks the user some questions and generates a configuration file
|
||||||
configuration file that is needed in order to run blag.
|
that is needed in order to run blag. Additionally, it creates the content
|
||||||
|
and static directories with some initial content, to get the user started.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ Install blag from PyPI_
|
|||||||
|
|
||||||
.. _pypi: https://pypi.org/project/blag/
|
.. _pypi: https://pypi.org/project/blag/
|
||||||
|
|
||||||
Run blag's quickstart command to create the configuration and templates needed
|
Run blag's quickstart command to create the configuration, templates and some
|
||||||
|
initial content.
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
@@ -23,7 +24,6 @@ Create some content
|
|||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
$ mkdir content
|
|
||||||
$ edit content/hello-world.md
|
$ edit content/hello-world.md
|
||||||
|
|
||||||
Generate the website
|
Generate the website
|
||||||
@@ -121,7 +121,7 @@ Static Files
|
|||||||
|
|
||||||
Static files can be put into the ``content`` directory and will be copied over
|
Static files can be put into the ``content`` directory and will be copied over
|
||||||
to the ``build`` directory as well. If you want better separation between
|
to the ``build`` directory as well. If you want better separation between
|
||||||
content and static files, you can create a ``static`` directory and put the
|
content and static files, you can use the ``static`` directory and put the
|
||||||
files there. All files and directories found in the ``static`` directory will
|
files there. All files and directories found in the ``static`` directory will
|
||||||
be copied over to ``build``.
|
be copied over to ``build``.
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,12 @@ def test_quickstart(cleandir: str, monkeypatch: MonkeyPatch) -> None:
|
|||||||
"archive.html",
|
"archive.html",
|
||||||
"article.html",
|
"article.html",
|
||||||
"base.html",
|
"base.html",
|
||||||
|
"index.html",
|
||||||
"page.html",
|
"page.html",
|
||||||
"tag.html",
|
"tag.html",
|
||||||
"tags.html",
|
"tags.html",
|
||||||
):
|
):
|
||||||
assert os.path.exists(f'templates/{template}')
|
assert os.path.exists(f'templates/{template}')
|
||||||
|
|
||||||
|
for directory in "build", "content", "static":
|
||||||
|
assert os.path.exists(directory)
|
||||||
|
|||||||
Reference in New Issue
Block a user