Skip to content

Commit

Permalink
Merge branch 'main' into plugin-asciidoc-jruby
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Dec 20, 2024
2 parents 35383dd + 05696f9 commit ee0cbcb
Show file tree
Hide file tree
Showing 27 changed files with 66 additions and 112 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-perform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Quarkiverse Perform Release
run-name: Perform ${{github.event.inputs.tag || github.ref_name}} Release
on:
push:
tags:
- '*'
tags-ignore:
- 'v*'
workflow_dispatch:
inputs:
tag:
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This project uses Java 21 and [Maven](https://maven.apache.org/) as build toolin

To run the tests, use the following:

```console
```shell
mvn verify
```

Expand All @@ -31,7 +31,7 @@ Maven automatically formats code and organizes imports when you run `mvn verify`

To install all Roq extensions, we need to run:

```console
```shell
mvn clean install
```

Expand All @@ -46,19 +46,19 @@ There are two ways for running the blog post locally:

Go to `blog` directory:

```console
```shell
cd blog
```

And, to execute the following maven command:

```console
```shell
mvn quarkus:dev
```

If you are using Quarkus CLI, you can use:

```console
```shell
quarkus dev
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

The Roq Static Site Generator extension allows to easily create a static website or blog (such as [Roq's blog](https://pages.quarkiverse.io/quarkus-roq/)) using Quarkus super-powers.

Get started [here](https://pages.quarkiverse.io/quarkus-roq/docs/getting-started)!
Get started [here](https://pages.quarkiverse.io/quarkus-roq/docs/)!

For those looking for the Roq Quarkus extensions (which can also be used standalone):
- [Roq Data](https://docs.quarkiverse.io/quarkus-roq/dev/quarkus-roq-data.html): Use json/yaml files content from your templates and articles with type safety.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "Build and Deploy Roq Site"
description: "Sets up JDK, builds the Quarkus site, and upload the GitHub Pages artifact."
branding:
icon: 'music'
color: 'orange'
inputs:
setup-java:
description: "Whether to setup Java or not"
Expand Down
5 changes: 2 additions & 3 deletions blog/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
quarkus.web-bundler.dependencies.auto-import=all
quarkus.log.category."io.quarkiverse.roq.frontmatter.deployment.scan".level=DEBUG
quarkus.default-locale=en
quarkus.qute.asciidoctorj.icons=font
quarkus.qute.asciidoctorj.source-highlighter=highlight.js
roq.version=foo
quarkus.asciidoctorj.attributes.icons=font
quarkus.asciidoctorj.attributes.source-highlighter=highlight.js
11 changes: 7 additions & 4 deletions blog/content/docs/basics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
title: Basics
layout: doc
---

{#include partials/doc/doc-attributes.adoc/}

= Roq the basics

By default, your site files should be located in the **project root directory**.
Expand Down Expand Up @@ -78,7 +76,7 @@ Your site index template is required and should be located in `content/index.htm
title: Hello Roqers // <1>
description: It is time to start Roqing 🎸!
layout: :theme/main //<2>
layout: :theme/index //<2>
---
Expand All @@ -92,7 +90,7 @@ layout: :theme/main //<2>
----

<1> The index.html also describe your `site` information through a FrontMatter header.
<2> The layout to use (in this case `:theme/main` which refers to the `main` layout from the theme).
<2> The layout to use (in this case `:theme/index` which refers to the `index` layout from the theme).
<3> We use the `{site.url(path)}` using Qute to manual resolve other pages urls.

|}
Expand Down Expand Up @@ -248,6 +246,11 @@ __{page.data.the-rope}!__ <3>
<2> you can add other FM data.
<3> FM data is available through `page.data`.

=== Global data

It is possible to


=== Collections

Collections are a great way to group related content such as blog posts, recipes, member of a team or talks at a conference.
Expand Down
2 changes: 2 additions & 0 deletions blog/content/docs/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
layout: doc
title: Getting Started
aliases:
- /docs
description: Getting started with Quarkus Roq
---

Expand Down
2 changes: 1 addition & 1 deletion blog/content/posts/2024-09-19-drafts-and-future.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ author: ia3andy

Roq just made content management easier with a cool new feature that lets you control drafts and future articles directly in your configuration. No more messing around with hard-to-track content—now you can manage everything through the Quarkus config:

```console
```shell
quarkus dev -site.drafts -site.future`
```

Expand Down
9 changes: 1 addition & 8 deletions blog/content/posts/2024-09-20-hightlight-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,11 @@ Now, let’s configure Highlight.js. In your `src/main/resources/web/app/main.js

```javascript
import hljs from 'highlight.js';
import 'highlight.js/scss/default.scss';

hljs.highlightAll();
```

### Step 3: Style Your Syntax Highlighting

To style the code blocks, import the Highlight.js default theme into your SCSS file. Add this to your `src/main/resources/web/app/main.scss`:

```scss
@import 'highlight.js/scss/default.scss';
```

And that's it! Now your code blocks will be beautifully highlighted, adding a more polished and professional look to your content.

This process is quick and effective, making it easy to provide clear, readable syntax highlighting for your users. Happy coding!
6 changes: 3 additions & 3 deletions blog/content/posts/2024-10-22-asciidoc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ Manually::
----
Using the Quarkus cli::
[source,console]
[source,shell]
----
quarkus extension add io.quarkiverse.roq:quarkus-roq-plugin-asciidoc
----
Using the Maven::
[source,console]
[source,shell]
----
./mvnw quarkus:add-extension -Dextensions="io.quarkiverse.roq:quarkus-roq-plugin-asciidoc"
----
Using the Gradle::
[source,console]
[source,shell]
----
./gradlew addExtension --extensions="io.quarkiverse.roq:quarkus-roq-plugin-asciidoc"
----
Expand Down
4 changes: 2 additions & 2 deletions blog/content/posts/2024-10-31-roq-with-blogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ First let me thanks the Roq [contributors]({site.url('about')}), they have been
[Click here](https://docs.quarkiverse.io/quarkus-roq/dev/index.html#:~:text=Click%20here%20to,roq%0Aquarkus%20dev) to generate your Roq Starter App.

or use the [Quarkus CLI](https://docs.quarkiverse.io/quarkus-roq/dev/index.html#:~:text=or%20use%20the-,Quarkus%20CLI,-%3A):
```console
```shell
quarkus create app blog-with-roq -x=io.quarkiverse.roq:quarkus-roq
```

Then

```console
```shell
cd blog-with-roq
quarkus dev
```
Expand Down
16 changes: 2 additions & 14 deletions blog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.17.3</quarkus.platform.version>
<quarkus.platform.version>3.17.5</quarkus.platform.version>
<quarkus-roq.version>999-SNAPSHOT</quarkus-roq.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.5.2</surefire-plugin.version>
Expand Down Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>org.mvnpm</groupId>
<artifactId>highlight.js</artifactId>
<version>11.10.0</version>
<version>11.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -197,18 +197,6 @@
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<skipITs>false</skipITs>
<quarkus.native.enabled>true</quarkus.native.enabled>
</properties>
</profile>
<profile>
<id>standalone</id>
<activation>
Expand Down
6 changes: 3 additions & 3 deletions blog/templates/partials/doc/start-roq.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

1. 👉 *Install* the https://quarkus.io/guides/cli-tooling[Quarkus CLI,window=_blank].
2. 🚀 **Generate the starter ap**p using the CLI (you can change the name), or via https://code.quarkus.io/?a=roq-with-blog&e=io.quarkiverse.roq%3Aquarkus-roq[code.quarkus.io,window=_blank]
2. 🚀 **Generate the starter app** using the CLI (you can change the name), or via https://code.quarkus.io/?a=roq-with-blog&e=io.quarkiverse.roq%3Aquarkus-roq[code.quarkus.io,window=_blank]
+
[source,console]
[source,shell]
----
quarkus create app roq-with-blog -x=io.quarkiverse.roq:quarkus-roq
----
3. 🎮 *start dev-mode*:
+
[source,console]
[source,shell]
----
cd roq-with-blog
quarkus dev
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include::./_includes/attributes.adoc[]

Roq allows to easily create a static website or blog using Quarkus super-powers.

The documentation is available in the https://pages.quarkiverse.io/quarkus-roq/docs/getting-started[Roq website].
The documentation is available in the https://pages.quarkiverse.io/quarkus-roq/docs/[Roq website].

Roq depends on a set of extensions which can also be used standalone:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/quarkus-roq-frontmatter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include::./_includes/attributes.adoc[]

Quarkus Roq FrontMatter is a Quarkus extension that create a website from your Markdown/Asciidoc/Html pages using FrontMatter headers (url, layout, seo, data).

The documentation is available in the https://pages.quarkiverse.io/quarkus-roq/getting-started[Roq website].
The documentation is available in the https://pages.quarkiverse.io/quarkus-roq/[Roq website].

CAUTION: Roq FrontMatter is already included as part of the Roq Static Site Generator extension `io.quarkiverse.roq:quarkus-roq`, Follow <<standalone-installation>> section to use it standalone.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/quarkus-roq-generator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CAUTION: Roq Generator is already included as part of the Roq Static Site Genera

You can generate your static site using:

[source,console]
[source,shell]
----
QUARKUS_ROQ_GENERATOR_BATCH=true mvn package quarkus:run -DskipTests
----
Expand All @@ -21,7 +21,7 @@ TIP: When used within the Roq Static Site Generator extension, it is already pre


You can now try or deploy your static website with any static file server. We provide a small tool to try it:
[source,console]
[source,shell]
----
$ jbang app install --verbose --fresh --force roq@quarkiverse/quarkus-roq
$ roq decks->!+(ia3andy/decks)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import java.util.List;
import java.util.Optional;
import java.util.Map;

import org.assertj.core.api.SoftAssertions;
import org.junit.jupiter.api.Test;
Expand All @@ -17,31 +17,17 @@ public class QuarkusAsciidoctorJTest {

public static final AsciidoctorJSectionHelperFactory FACTORY = new AsciidoctorJSectionHelperFactory(
new AsciidoctorJConverter(new AsciidoctorJConfig() {
@Override
public Optional<String> icons() {
return Optional.empty();
}

@Override
public Optional<String> sourceHighlighter() {
return Optional.empty();
public Map<String, String> attributes() {
return Map.of();
}

@Override
public String templatesDir() {
return "src/main/asciidoc-templates";
}

@Override
public Optional<String> outputImageDir() {
return Optional.empty();
}

@Override
public Optional<String> imageDir() {
return Optional.empty();
}

}));

@Test
Expand Down
1 change: 1 addition & 0 deletions plugin/asciidoc-jruby/deployment/wunderbar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
package io.quarkiverse.roq.plugin.asciidoctorj.runtime;

import java.util.Optional;
import java.util.Map;

import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;

@ConfigMapping(prefix = "quarkus.qute.asciidoctorj")
@ConfigMapping(prefix = "quarkus.asciidoctorj")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public interface AsciidoctorJConfig {

/**
* To enable image-based icons, you set this config to the value font.
* Set Asciidoctorj attributes
*/
Optional<String> icons();
Map<String, String> attributes();

/**
* Source highlighting is applied to text that’s assigned the source block style (either explicitly or implicitly) and a
* source language.
*/
Optional<String> sourceHighlighter();

/**
* Where images will be rendered
* Templates directory for Asciidoctorj
*/
@WithDefault("src/main/asciidoc-templates")
String templatesDir();

/**
* Where images will be rendered
*/
@WithDefault("target/images/")
Optional<String> outputImageDir();

/**
* Where images will linked to.oq
*
*/
@WithDefault("/public")
Optional<String> imageDir();

}
Loading

0 comments on commit ee0cbcb

Please sign in to comment.