Skip to content

Commit a87da65

Browse files
authored
Merge pull request #2281 from jasondlee/roq
Migrate from Jekyll to Roq
2 parents fd00158 + ff4ef42 commit a87da65

File tree

11,466 files changed

+2660
-1549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,466 files changed

+2660
-1549
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/*

.github/workflows/roq.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Roq Site Deploy
2+
3+
on:
4+
push:
5+
branches: [ develop ] # Switch to the branch which should be deployed to GitHub Pages
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Generate Roq Site
14+
uses: quarkiverse/quarkus-roq@v1
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }} # Used to automatically get the GitHub Pages url
17+
deploy:
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
permissions:
22+
pages: write # to deploy to Pages
23+
id-token: write # to verify the deployment originates from an appropriate source
24+
runs-on: ubuntu-latest
25+
needs: build
26+
steps:
27+
- name: Deploy to GitHub Pages
28+
id: deployment
29+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
1+
#Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
release.properties
7+
.flattened-pom.xml
8+
9+
# Eclipse
110
.project
11+
.classpath
12+
.settings/
13+
bin/
14+
15+
# IntelliJ
216
.idea
17+
*.ipr
18+
*.iml
19+
*.iws
20+
21+
# NetBeans
22+
nb-configuration.xml
23+
24+
# Visual Studio Code
325
.vscode
4-
target
5-
_site
6-
vendor/
7-
.sass-cache
8-
.jekyll-cache
9-
.jekyll-metadata
10-
Gemfile.lock
26+
.factorypath
27+
28+
# OSX
29+
.DS_Store
30+
31+
# Vim
32+
*.swp
33+
*.swo
34+
35+
# patch
36+
*.orig
37+
*.rej
38+
39+
# Local environment
40+
.env
41+
42+
# Plugin directory
43+
/.quarkus/cli/plugins/
44+
# TLS Certificates
45+
.certs/

.mvn/wrapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maven-wrapper.jar
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.net.Authenticator;
23+
import java.net.PasswordAuthentication;
24+
import java.net.URI;
25+
import java.net.URL;
26+
import java.nio.file.Files;
27+
import java.nio.file.Path;
28+
import java.nio.file.Paths;
29+
import java.nio.file.StandardCopyOption;
30+
import java.util.concurrent.ThreadLocalRandom;
31+
32+
public final class MavenWrapperDownloader {
33+
private static final String WRAPPER_VERSION = "3.3.2";
34+
35+
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
36+
37+
public static void main(String[] args) {
38+
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);
39+
40+
if (args.length != 2) {
41+
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
42+
System.exit(1);
43+
}
44+
45+
try {
46+
log(" - Downloader started");
47+
final URL wrapperUrl = URI.create(args[0]).toURL();
48+
final String jarPath = args[1].replace("..", ""); // Sanitize path
49+
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
50+
downloadFileFromURL(wrapperUrl, wrapperJarPath);
51+
log("Done");
52+
} catch (IOException e) {
53+
System.err.println("- Error downloading: " + e.getMessage());
54+
if (VERBOSE) {
55+
e.printStackTrace();
56+
}
57+
System.exit(1);
58+
}
59+
}
60+
61+
private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
62+
throws IOException {
63+
log(" - Downloading to: " + wrapperJarPath);
64+
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
65+
final String username = System.getenv("MVNW_USERNAME");
66+
final char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
67+
Authenticator.setDefault(new Authenticator() {
68+
@Override
69+
protected PasswordAuthentication getPasswordAuthentication() {
70+
return new PasswordAuthentication(username, password);
71+
}
72+
});
73+
}
74+
Path temp = wrapperJarPath
75+
.getParent()
76+
.resolve(wrapperJarPath.getFileName() + "."
77+
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");
78+
try (InputStream inStream = wrapperUrl.openStream()) {
79+
Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING);
80+
Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING);
81+
} finally {
82+
Files.deleteIfExists(temp);
83+
}
84+
log(" - Downloader complete");
85+
}
86+
87+
private static void log(String msg) {
88+
if (VERBOSE) {
89+
System.out.println(msg);
90+
}
91+
}
92+
93+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=source
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,62 @@
55
These instructions will allow you to run the Elytron website locally for development and testing purposes.
66

77
### Installation
8-
The following steps are based on the [Jekyll static site generator docs](https://jekyllrb.com/docs/).
8+
The following steps are based on the [Roq static site generator docs](https://iamroq.com/docs/getting-started/).
99

10-
1. Install a full [Ruby development environment](https://jekyllrb.com/docs/installation/)
11-
2. Install jekyll and [bundler](https://jekyllrb.com/docs/ruby-101/#bundler) [gems](https://jekyllrb.com/docs/ruby-101/#gems)
12-
13-
gem install jekyll bundler
10+
1. Install a full Java development environment. For example, using [SDKMAN!](https://sdkman.io/)
11+
12+
$curl -s "https://get.sdkman.io" | bash
13+
...
14+
$ sdk install java 24-tem
15+
...
16+
$ sdk install maven 3.9.9
17+
...
18+
$ sdk install quarkus # This is optional
19+
20+
2. Fork the [project repository](https://github.com/wildfly-security/wildfly-elytron), then clone your fork.
1421

15-
3. Fork the [project repository](https://github.com/wildfly-security/wildfly-elytron), then clone your fork.
16-
1722
git clone git@github.com:YOUR_USER_NAME/wildfly-elytron.git
1823

19-
4. Change into the project directory:
20-
24+
3. Change into the project directory:
25+
2126
cd wildfly-elytron
2227

23-
5. Checkout the [develop](https://github.com/wildfly-security/wildfly-elytron/tree/develop) branch:
24-
28+
4. Check out the [develop](https://github.com/wildfly-security/wildfly-elytron/tree/develop) branch:
29+
2530
git checkout develop
2631

27-
6. Use bundler to fetch all required gems in their respective versions
32+
5. Build the site and make it available on a local server
33+
34+
mvn quarkus:dev
2835

29-
bundle install
36+
or
3037

31-
7. Build the site and make it available on a local server
32-
33-
bundle exec jekyll serve
38+
quarkus dev
3439

35-
If you encounter the following message:
40+
6. Now browse to http://localhost:8080/wildfly-elytron/
3641

37-
FATAL: Listen error: unable to monitor directories for changes.
38-
39-
Please refer to these [instructions](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers) to fix this.
40-
41-
8. Now browse to http://localhost:4000/wildfly-elytron/
42+
7. Optionally, to just build the static files:
4243

43-
> If you encounter any unexpected errors during the above, please refer to the [troubleshooting](https://jekyllrb.com/docs/troubleshooting/#configuration-problems) page or the [requirements](https://jekyllrb.com/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites.
44+
QUARKUS_ROQ_GENERATOR_BATCH=true mvn package quarkus:run
4445

46+
The files will available under `target/roq`.
4547

46-
**For more regarding the use of Jekyll, please refer to the [Jekyll Step by Step Tutorial](https://jekyllrb.com/docs/step-by-step/01-setup/).**
4748

4849
## Writing a blog post
4950

5051
To write a blog post:
5152

52-
1. Add an author entry in [_data/authors.yaml](https://github.com/wildfly-security/wildfly-elytron/tree/develop/_data/authors.yaml)
53+
1. Add an author entry in [data/authors.yaml](https://github.com/wildfly-security/wildfly-elytron/tree/develop/data/authors.yaml)
5354
- Your profile picture is fetched from [the Gravatar service](https://gravatar.com/). Create an account,
54-
and then associate your email with the account. Validate your picture with [the email checker](https://gravatar.com/site/check/).
55+
and then associate your email with the account. Validate your picture with [the email checker](https://gravatar.com/site/check/).
5556
The field `emailhash` in authors.yaml is set using [these instructions](https://gravatar.com/site/implement/hash/),
5657
or with the output from the following command:
5758
```bash
5859
echo -n 'email@address.com' | awk '{NF=1;printf "%s", tolower($1);}' | md5sum - | awk 'NF=1'
5960
```
60-
2. Create a blog post entry under [_posts](https://github.com/wildfly-security/wildfly-elytron/tree/develop/_posts)
61+
2. Create a blog post entry under [content/blog](https://github.com/wildfly-security/wildfly-elytron/tree/develop/content/blog)
6162
- The file name should be `yyyy-mm-dd-slug.adoc`
62-
3. Your blog post should be in asciidoc format (take a look at other blogs posts in the _posts directory to see examples)
63+
3. Your blog post should be in asciidoc format (take a look at other blogs posts in the `content/blog` directory to see examples)
6364
- To view your blog post without needing to build locally, the following steps can be used:
6465
- If you haven't done so already, generate a fine-grained GitHub token following the instructions
6566
[here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token). Use this value to add a `PUSH_GITHUB_TOKEN` secret to your
@@ -76,6 +77,6 @@ To write a blog post:
7677
git push origin gh-pages
7778
```
7879
- To view your blog post locally, first follow the instructions [above](https://github.com/wildfly-security/wildfly-elytron/tree/develop#installation) to build the Elytron website
79-
locally. Then browse to http://localhost:4000/wildfly-elytron/blog and click on your post.
80+
locally. Then browse to http://localhost:8080/wildfly-elytron/blog and click on your post.
8081
4. Submit a pull request against the `wildfly-elytron` `develop` branch
8182

0 commit comments

Comments
 (0)