Quarkus Roq Plugins

Roq Plugin Tagging

This plugin allows to generate a dynamic (derived) collection based on a given collection tags.

To install it:

quarkus ext add quarkus-roq-plugin-tagging

For example, let’s consider the posts collection, if multiple posts have tags: guide, then we would generate a /posts/tag/guide page for all the posts containing the guide tag. This works for any collection.

To enable tagging, create a layout template, add tagging: [collection id] in FM. As a result you will have access to a new derived collection named tagCollection. It is available through site.collections.get(page.data.tagCollection):

templates/layouts/tag.html
---
layout: main
tagging: posts
---

{#for post in site.collections.get(page.data.tagCollection)}
  <div>{post.title}</div>
{/for}

This also support pagination like any other collection, as tagging is already specifying the target collection, pagination can be enabled just with in FM paginate: true:

templates/layouts/tag.html
---
layout: main
tagging: posts
paginate: true
---

{#for post in site.collections.get(page.data.tagCollection).paginated(page.paginator)}
  <div>{post.title}</div>
{/for}

Roq Plugin Aliases

This plugin allows creating one or many aliases (redirections) for a page.

To install it:

quarkus ext add quarkus-roq-plugin-aliases

For example, consider that you want to create a shortened link for your post.

To create an alias, create a page and add aliases: [your-alias-here, another-alias-here] in the Front Matter (FM). As a result, you will have the possibility to access the page using a customized URL as alias.

content/posts/2024-08-29-welcome-to-roq.md
---
layout: :theme/post
title: "Welcome to Roq!"
date: 2024-08-29 13:32:20 +0200
description: This is the first article ever made with Quarkus Roq
img: posts/2024/08/blogging.jpg
tags: blogging
author: ia3andy
aliases: [first-roq-article-ever]
---

Now, when you access the URL http://localhost:8081/first-roq-article-ever, you will be redirected to the 2024-08-29-welcome-to-roq blog post.

you can use link templating in aliases

Roq Plugin AsciiDoc

This plugin allows to use asciidoc to produce content.

There are two implementations of Asciidoc for Roq:

  1. Asciidoc (Java): Provides fast startup and native build compatibility but has limited features and does not support extensions.

  2. Asciidoc JRuby: Offers the full feature set of Asciidoctor but is slower to start and incompatible with native builds.

To install it:

quarkus ext add quarkus-roq-plugin-asciidoc

or

To install it:

quarkus ext add quarkus-roq-plugin-asciidoc-jruby

Once done, every file with either '.adoc' or '.asciidoc' extension will be processed.

For better security, Asciidoc includes have been disabled, use Qute includes instead.

Roq Plugin Markdown

This plugin allows to use markdown to produce content.

Markdown plugin is already included in Quarkus Roq extension.

To install it run:

quarkus ext add quarkus-roq-plugin-markdown

Once done, every file with either '.md' or '.markdown' extension will be processed.

Roq Plugin QR Code

This plugin allows you to add a QR Code to your website.

To install it run:

quarkus ext add quarkus-roq-plugin-qrcode

Then create a template and add the {#qrcode …​} tag to it and style and size it as you want.

By default, the plugin produces HTML output compatible with both HTML and MarkDown templates. To use the plugin with asciidoc, set the asciidoc attribute to true (the default is false).

{#qrcode value="https://luigis.com/menu/" alt="Luigi's Menu" foreground="#000066" background="#FFFFFF" width=300 height=300 /} // Will generate HTML code
{#qrcode value="https://luigis.com/menu/" alt="Luigi's Menu" foreground="#000066" background="#FFFFFF" width=300 height=300 asciidoc=true/} // Will save the file in the static folder and generate an asciidoc image macro pointing to it

Roq Plugin Series

This plugin allows you to join multiple posts in a series.

To install it run:

quarkus ext add quarkus-roq-plugin-series

Edit the layout for your posts, for example when using roq-default theme:

templates/layouts/roq-default/post-series.html
---
layout: theme-layouts/roq-default/post
---

{#include partials/roq-series /} (1)

{#insert /} (2)
1 This will add the series partial before the post content, if it’s declared.
2 This is the post content

And finally, use this layout and add the series attribute in the Front Matter of the posts you want to join.

---
layout: series-post
title: Assemble you blog post in a series
description: Automatically series header for your posts
tags: plugin, frontmatter, guide, series
author: John Doe
series: My series Title (1)
---
1 You should use the exact same title for all documents in the series.

Roq Plugin Sitemap

This plugin allows you to easily create a sitemap.xml for your site.

To install it run:

quarkus ext add quarkus-roq-plugin-sitemap

Then create a new sitemap file:

content/sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/easily-generate-a-sitemap-xml-for-your-site-with-roq/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/static-attached-files-for-posts-and-pages/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/already-some-happy-users/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/do-you-want-to-publish-a-blog-post-series/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/need-a-qr-code/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/roq-with-blogs/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/write-your-blog-posts-in-asciidoc/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/rss-feed-of-your-blog-posts/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/the-second-roq-plugin-is-for-redirecting-your-page-to-a-better-place/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/the-first-roq-plugin-is-for-tagging-with-pagination/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/out-of-the-box-awesome-seo/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/mastering-pagination-in-roq/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/how-to-add-syntax-highlighting-to-your-roq-site/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/easily-manage-drafts-and-future-articles-in-roq/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/effortless-url-handling-in-roq-with-qute-super-power/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/welcome-to-roq/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/docs/basics/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/docs/advanced/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/docs/publishing/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/docs/plugins/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/docs/getting-started/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/events/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/about/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/page2/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/pagination/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/blogging/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/styling/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/plugin/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/plugin/page2/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/happy-users/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/cool-stuff/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/cool-stuff/page2/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/frontmatter/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/frontmatter/page2/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/frontmatter/page3/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/seo/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/guide/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/guide/page2/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
    <url>
        <loc>https://pages.quarkiverse.io/quarkus-roq/posts/tag/guide/page3/</loc>
        <lastmod>2025-01-17T13:17:19Z</lastmod>
    </url>
</urlset>