summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2021-06-05 03:13:59 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2021-06-05 03:13:59 -0600
commit045eb5986ea11174b2ee39dc8476b365d734d37d (patch)
tree35b3d63df25bae33857fe3614501155940f24236 /README.md
parent81bf1f33c34bd37ebcef4dc8f76d881248a22832 (diff)
refactor code and add image_url parsingv0.5.3
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index f337961..ff20b5b 100644
--- a/README.md
+++ b/README.md
@@ -71,12 +71,13 @@ For more options/flags just checkout `pyssg -h`.
Here is the list of variables that you can use specific Jinja templates with a short description. Note that all urls are without the trailing slash `/`.
-- General:
- - `site_title` (`str`) (all): title of the website.
- - `site_base_url` (`str`) (all): base url of the website.
- - `site_base_static_url` (`str`) (all): base static url where all static files are located, mostly needed for correct rss feed generator when using a `base` tag and using relative links to files. For more, see [<base>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base).
- - `pyssg_version` (`str`) (all): version in numeric form, i.e. `0.5.0`.
- - `run_date` (`str`) (all): date when the program was run, with format required for rss.
+- `config` (`Configuration`) (all): configuration object containing general/global attributes, the useful ones being:
+ - `title` (`str`): title of the website.
+ - `url` (`str`): base url of the website.
+ - `static_url` (`str`): base static url where all static files are located, mostly needed for correct rss feed generator when using a `base` tag and using relative links to files. For more, see [<base>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base).
+ - `default_image_url` (`str`): as defined in `DEFAULT_IMAGE_URL` configuration option.
+ - `version` (`str`): version in numeric form, i.e. `0.5.0`.
+ - `run_date` (`str`): date when the program was run, with format required for rss.
- Pages:
- `all_pages` (`list(Page)`) (all): list of all the pages, sorted by creation time, reversed.
- `page` (`Page`) (`page.html`): page object that contains the following attributes:
@@ -98,7 +99,8 @@ Here is the list of variables that you can use specific Jinja templates with a s
- `summary` (`str`): summary of the page, as specified in the `*.md` file.
- `lang` (`str`): page language, used for the general `html` tag `lang` attribute.
- `tags` (`list(tuple(str))`): list of tuple of tags of the page, containing the name and the url of the tag, in that order. Defaults to empty list.
- - `url` (`str`): url of the page, this already includes the `site_base_url`.
+ - `url` (`str`): url of the page, this already includes the `config.url`.
+ - `image_url` (`str`): image url of the page, this already includes the `config.static_url`. Defaults to the `DEFAULT_IMAGE_URL` configuration option.
- `next/previous` (`Page`): reference to the next or previous page object (containing all these attributes). Defaults to None
- `og` (`dict(str, str)`): dict for object graph metadata.
- `meta` (`dict(str, list(str))`): meta dict as obtained from python-markdown, in case you use a meta tag not yet supported, it will be available there.