Showcase: Functions
Gravitron includes a series of handy functions like tags, categories, a page media gallery… And more is still to come. A demo for the sitemap-style listing of all existing pages is available here.
Per-page custom CSS
If enabled by setting css: in the page head and the specified CSS file exists in the
folder of the page, the file is loaded automatically last in order: This way CSS overrides or
extensions are possible per page, see the nicotine background gradient to the right bottom of this
page:
css: "showcase-functions-custom.css"
Page aliases
Pages can have one or more alias URLs. The YAML page header of /showcase/theme has defined 3 alias URLs:
aliases:
- "/demopage"
- "/showcase/css"
- "/css"
The page is reachable via /demopage, /showcase/css and /css. The canonical page is however SEO friendly set to the real URL, see the meta tag in its source:
<link rel="canonical" href="https://gravitron.dev/showcase/theme">
Be sure not to define identical alias URLs for more than one page or an alias with a primary URL of a page! While primary page URLs are processed first, multiple identical aliases may lead to unpredictable results. (The first match in pages order wins, but I won't tell you…)
Taxonomy
If present in the page, meta.tags and meta.categories are accessible:
Tags
Files
If enabled globally via ENABLE_PAGE_FILES, files in a page folder are
propagated to the Twig array meta.files for file extensions listed
in ALLOWED_PAGE_FILETYPES. Any custom page CSS file is ignored, see
section "Per-page custom CSS" above:
- document.css: Type
text/plain, size 0.06 kB Bytes, date: 2025-11-28, 06:23:57 - document.ini: Type
text/plain, size 0.03 kB Bytes, date: 2025-11-17, 13:47:43 - document.pdf: Type
application/pdf, size 186.00 kB Bytes, date: 2025-11-17, 13:50:44 - document.txt: Type
text/plain, size 0.02 kB Bytes, date: 2025-11-17, 13:47:49 - gravitron.gif: Type
image/gif, size 39.74 kB Bytes, date: 2025-11-18, 18:02:08 - gravitron.jpg: Type
image/jpeg, size 72.61 kB Bytes, date: 2025-11-18, 18:01:52 - gravitron.svg: Type
image/svg+xml, size 4.88 kB Bytes, date: 2025-11-25, 08:30:38 - gravitron.webp: Type
image/webp, size 15.88 kB Bytes, date: 2025-11-18, 18:10:18
Media files
If enabled globally via ENABLE_PAGE_FILES, image and video files defined in
ALLOWED_MEDIA_FILETYPES, are available in meta.media_files and can
automatically be shown in an in-page gallery. — see below. Andre Rinas
SimpleLightbox is used
for image links with rel="lightbox". Any custom page CSS file is
ignored, see section "Per-page custom CSS" above:
- gravitron.gif: Type
image/gif, size 39.74 kB Bytes, date: 2025-11-18, 18:02:08 - gravitron.jpg: Type
image/jpeg, size 72.61 kB Bytes, date: 2025-11-18, 18:01:52 - gravitron.svg: Type
image/svg+xml, size 4.88 kB Bytes, date: 2025-11-25, 08:30:38 - gravitron.webp: Type
image/webp, size 15.88 kB Bytes, date: 2025-11-18, 18:10:18
Gallery
Theme information
This theme has a user/config/theme.yaml file. If present and valid, its content
together with configuration data is propagated to the Twig array theme:
- Variable
theme_name: Gravitron - Variable
theme_author: Stefan Onderka - Variable
theme_email: contact@gravitron.dev - Variable
theme_website: https://gravitron.dev/manual/ - Variable
theme_demo: https://gravitron.dev/ - Variable
theme_repo: https://github.com/noppingen/Gravitron - Variable
theme_date: 2025-11-29 10:21:15 CET - Variable
theme_codename: Wanking Weasel - Variable
theme_version: 0.7 alpha


