A Quarkus extension that adds search engine and social media output to a web application. It writes meta tags and JSON-LD into the page head. It serves a sitemap and a robots.txt. You add the extension, set the site URL and put one tag in your base template. Every part accepts configuration, a replacement bean or a switch.
- One Qute tag,
{#seo /}, that writes title, description, canonical, hreflang, Open Graph and Twitter tags - A request scoped
Seobean that sets values from Java, which win over the values of the tag - Typed schema.org builders for JSON-LD, without Jackson
- A sitemap from configuration, from
@SitemapEntryand from your own beans, with an index above 50,000 URLs - A robots.txt from rule groups, with presets for AI crawlers
- Opt-in security.txt, web manifest, IndexNow and llms.txt, all off by default
- A Dev UI with an overview and a page check that lists content warnings in dev mode
- No indexing outside the prod profile
- Optional caching with
quarkus-cache - Replaceable beans for locales, rendering, the sitemap, robots.txt, the base URL and IndexNow
- Native image support that needs no configuration
Add the extension to your Quarkus application.
<dependency>
<groupId>org.sitenetsoft</groupId>
<artifactId>quarkus-seo</artifactId>
<version>0.1.0</version>
</dependency>implementation("org.sitenetsoft:quarkus-seo:0.1.0")Set the public address of the site in application.properties:
quarkus.seo.site-url=https://example.org
quarkus.seo.site-name=ExamplePut the tag in the <head> of your base template:
<head>
<meta charset="utf-8">
{#seo /}
</head>The site now serves /sitemap.xml and /robots.txt. Each page has a title, a canonical link and the social tags.
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import io.quarkus.qute.TemplateInstance;
import org.sitenetsoft.quarkus.seo.Seo;
@Path("/")
public class PageResource {
@Inject
Seo seo;
@GET
@Path("{slug}")
@Produces("text/html")
public TemplateInstance page(@PathParam("slug") String slug) {
CmsPage page = cms.get(slug);
seo.title(page.title()).description(page.summary());
return Templates.page(page);
}
}The title template adds the site name. For the title About us, the page title is About us | Example.
Set quarkus.seo.site-url or quarkus.seo.allowed-hosts in production. Without them, the extension builds absolute
URLs from the Host header of the request. See
The Host header.
Building requires Java 25 and Maven. The artifacts target Java 21. Set JAVA_HOME to a JDK 25.
# Build all modules and run the tests
JAVA_HOME=/path/to/jdk-25 mvn -T 4 verify
# Build the documentation with the generated configuration reference
JAVA_HOME=/path/to/jdk-25 mvn -Pdocs -pl docs -am packageRead the full documentation for these guides:
- Meta tags
- JSON-LD
- Sitemap
- robots.txt
- Opt-in outputs
- Dev UI
- Customizing
- Integrating from another extension
- Native
- Testing
- Releasing
- Configuration Reference
| Extension Version | Quarkus Version | Java Version |
|---|---|---|
| 0.1.0 | 3.40.1 | 21 or later |
This project uses the Apache License 2.0.