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 as list:
aliases:
- "/demopage"
- "/showcase/css"
- "/css"
A single alias may also be specified as string, not as an array/list:
aliases: "/otherpage"
The page Showcase: Theme is thus reachable via /demopage, /showcase/css
and /css. The canonical page meta tag is however SEO friendly set to the real URL:
<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…)
Files
If enabled globally via ENABLE_PAGE_FILES, files in a page folder are
propagated to the Twig array page_files for file extensions listed
in ALLOWED_PAGE_FILETYPES. Any custom page CSS file is ignored, see
section "Per-page custom CSS" above:
- File document.css: Type
text/plain, size 0.06 kB, date: 2025-11-28, 06:23:57 - File document.ini: Type
text/plain, size 0.03 kB, date: 2025-11-17, 13:47:43 - File document.pdf: Type
application/pdf, size 186.00 kB, date: 2025-11-17, 13:50:44 - File document.txt: Type
text/plain, size 0.02 kB, date: 2025-11-17, 13:47:49 - File gravitron.gif: Type
image/gif, size 39.74 kB, date: 2025-11-18, 18:02:08 - File gravitron.jpg: Type
image/jpeg, size 72.61 kB, date: 2025-11-18, 18:01:52 - File gravitron.svg: Type
image/svg+xml, size 4.88 kB, date: 2025-11-25, 08:30:38 - File gravitron.webp: Type
image/webp, size 15.88 kB, 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 page_mediafiles 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:
- File gravitron.gif: Type
image/gif, size 39.74 kB, date: 2025-11-18, 18:02:08 - File gravitron.jpg: Type
image/jpeg, size 72.61 kB, date: 2025-11-18, 18:01:52 - File gravitron.svg: Type
image/svg+xml, size 4.88 kB, date: 2025-11-25, 08:30:38 - File gravitron.webp: Type
image/webp, size 15.88 kB, 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:
theme.name: Gravitron Default Themetheme.version: 1.0.0theme.date: 2025-12-02 06:53theme.codename: Angry Aspargustheme.author: Stefan Onderkatheme.email: contact@gravitron.devtheme.website: https://gravitron.dev/manual/theme.demo: https://gravitron.dev/theme.repo: https://github.com/noppingen/Gravitron


