Skip to content

Commit

Permalink
Introduce roq-frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Aug 28, 2024
1 parent b7dcd57 commit 4f3fae1
Show file tree
Hide file tree
Showing 65 changed files with 7,885 additions and 160 deletions.
106 changes: 106 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.quarkiverse.roq</groupId>
<artifactId>quarkus-roq-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-roq-integration-tests</artifactId>
<name>Quarkus Roq - Integration Tests</name>

<properties>
<skipITs>true</skipITs>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkiverse.roq</groupId>
<artifactId>quarkus-roq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.web-bundler</groupId>
<artifactId>quarkus-web-bundler</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>native-image</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${native.surefire.skip}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<skipITs>false</skipITs>
<quarkus.native.enabled>true</quarkus.native.enabled>
</properties>
</profile>
</profiles>
</project>
7 changes: 7 additions & 0 deletions integration-tests/site/_data/author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: ROQ # add your name
img: iamroq.png # add your photo
about: All the tools to generate static websites out of your Quarkus web application. # add description
social-twitter: quarkusio # add your Twitter handle
social-facebook: # add your Facebook handle
social-github: quarkusio # add your Github handle
social-linkedin: quarkusio # add your Linkedin handle
23 changes: 23 additions & 0 deletions integration-tests/site/_data/events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- title: "Tech Conference 2024"
description: "An annual conference bringing together tech enthusiasts, developers, and industry leaders to discuss the latest trends in technology."
date: "2024-09-15"

- title: "Autumn Art Expo"
description: "A showcase of contemporary art from emerging artists around the world, featuring paintings, sculptures, and installations."
date: "2024-10-05"

- title: "Culinary Arts Festival"
description: "A food festival celebrating the diversity of culinary arts, with cooking demonstrations, food tastings, and workshops by renowned chefs."
date: "2024-11-12"

- title: "Winter Music Gala"
description: "A gala event featuring performances by leading classical musicians and orchestras, celebrating the beauty of winter through music."
date: "2024-12-20"

- title: "Spring Film Festival"
description: "A week-long film festival showcasing independent films from around the globe, with screenings, Q&A sessions, and panel discussions."
date: "2025-03-10"

- title: "Summer Science Symposium"
description: "A symposium for scientists, researchers, and academics to present their latest research findings and discuss advancements in various fields of science."
date: "2025-06-22"
8 changes: 8 additions & 0 deletions integration-tests/site/_data/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Hello, world! I'm Roq
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _data/config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
link: ':title/'
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
52 changes: 52 additions & 0 deletions integration-tests/site/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<head>
<meta charset="utf-8">
<title>
{#if page.title}{page.title} - {site.title}{#else}{site.title}{/if}
</title>

<!-- Edit site and author settings in `_config.yml` to make the social details your own -->

<meta content="{site.title}" property="og:site_name">


<meta name="twitter:card" content="summary">
{#if page.title}
<meta name="twitter:title" content="{page.title}">
{#else}
<meta name="twitter:title" content="{site.title}">
{/if}
{#if page.url}
<meta name="twitter:url" content="{site.url}{page.url}">
{/if}
{#if page.description}
<meta name="twitter:description" content="{page.description}">
{#else}
<meta name="twitter:description" content="{site.description}">
{/if}
{#if page.img}
<meta name="twitter:image:src" content="{site.url}{site.baseurl}/assets/img/{page.img}">
{/if}


<meta name="description" content="{page.description}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:image" content="">
<link rel="shortcut icon" href="{site.baseurl}/assets/img/favicon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="{site.baseurl}/assets/img/favicon/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="{site.baseurl}/assets/img/favicon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="{site.baseurl}/assets/img/favicon/apple-touch-icon-144x144.png">
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#263959">
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" content="#263959">
<!-- iOS Safari -->
<meta name="apple-mobile-web-app-status-bar-style" content="#263959">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=PT+Serif:400,700|Lato:300,400,700&display=swap" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="{site.baseurl}/static/assets/fonts/font-awesome/css/font-awesome.min.css">


{#bundle /}
</head>
2 changes: 2 additions & 0 deletions integration-tests/site/_includes/javascripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- Main Js -->
<script src="{site.baseurl}/static/assets/js/main.js"></script>
21 changes: 21 additions & 0 deletions integration-tests/site/_includes/pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="container">
<nav class="pagination" role="pagination">
<ul>
{#if paginator.previousPage}
{#if paginator.previousPage == 1}
<p><a class="newer-posts" href="{site.baseurl}/"><i class="fa fa-long-arrow-left" aria-hidden="true"></i></a></p>
{#else}
<p><a class="newer-posts" href="{site.baseurl}/page/{paginator.previousPage}/"><i class="fa fa-long-arrow-left" aria-hidden="true"></i></a></p>
{/if}
{/if}

{#if paginator.totalPages > 1}
<p><span class="page-number">Page {paginator.page} of {paginator.totalPages}</span></p>
{/if}

{#if paginator.nextPage}
<p><a class="older-posts" href="{site.baseurl}/page/{paginator.nexPpage}/"><i class="fa fa-long-arrow-right" aria-hidden="true"></i></a></p>
{/if}
</ul>
</nav>
</div>
11 changes: 11 additions & 0 deletions integration-tests/site/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
{#include head.html /}
<body>

<div class="wrapper">
{#insert /}
</div>

</body>
</html>
45 changes: 45 additions & 0 deletions integration-tests/site/_layouts/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
layout: default
link: ":name.html"
---
<aside class="sidebar">
<header>
<div class="about">
{#if cdi:author.img??}
<div class="cover-author-image">
<a href="{site.baseurl}/"><img src="{site.baseurl}/static/assets/img/{cdi:author.img}" alt="{cdi:author.name}"></a>
</div>
{/if}
<div class="author-name">{cdi:author.name}</div>
<p>{cdi:author.about}</p>
</div>
</header> <!-- End Header -->
<footer>
<section class="contact">
<h3 class="contact-title">Contact me</h3>
<ul>
{#if cdi:author.social-twitter??}
<li><a href="https://twitter.com/{cdi:author.social-twitter}" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
{/if}
{#if cdi:author.social-facebook??}
<li><a href="https://facebook.com/{cdi:author.social-facebook}" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
{/if}
{#if cdi:author.social-github??}
<li class="github"><a href="http://github.com/{cdi:author.social-github}" target="_blank"><i class="fa fa-github"></i></a></li>
{/if}
{#if cdi:author.social-linkedin??}
<li class="linkedin"><a href="https://in.linkedin.com/in/{cdi:author.social-linkedin}" target="_blank"><i class="fa fa-linkedin"></i></a></li>
{/if}
{#if cdi:author.social-email??}
<li class="email"><a href="mailto:{cdi:author.social-email?}"><i class="fa fa-envelope-o"></i></a></li>
{/if}
</ul>
</section> <!-- End Section Contact -->
<div class="copyright">
<p>{site.time.format('Y')} &copy; {cdi:author.name}</p>
</div>
</footer> <!-- End Footer -->
</aside> <!-- End Sidebar -->
<div class="content-box clearfix">
{#insert /}
</div>
39 changes: 39 additions & 0 deletions integration-tests/site/_layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: main
link: posts/:title
---
<article class="article-page">
<div class="page-content">
{#if page.img}
<div class="page-cover-image">
<figure>
<img class="page-image" src="{site.baseurl}/static/assets/img/{page.img}" alt="{page.title}">
{#if page.figCaption}
<figcaption>{page.figCaption}</figcaption>
{/if}
</figure>
</div> <!-- End Page Cover Image -->
{/if}
<div class="wrap-content">
<header class="header-page">
<h1 class="page-title">{page.title}</h1>
<div class="page-date"><span>{page.date.format('yyyy, MMM dd')}&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
</header>
{#insert /}
<div class="page-footer">
<div class="page-share">
<a href="https://twitter.com/intent/tweet?text={page.title}&url={site.url}{page.link}" title="Share on Twitter" rel="nofollow" target="_blank">Twitter</a>
<a href="https://facebook.com/sharer.php?u={site.url}{page.link}" title="Share on Facebook" rel="nofollow" target="_blank">Facebook</a>
<a href="https://plus.google.com/share?url={site.url}{page.link}" title="Share on Google+" rel="nofollow" target="_blank">Google+</a>
</div>
<div class="page-tag">
{#if page.tags}
{#for tag in page.tags}
<a href="{site.baseurl}/tags#{tag}" class="tag">&#35; {tag}</a>
{/for}
{/if}
</div>
</div>
</div> <!-- End Wrap Content -->
</div> <!-- End Page Content -->
</article> <!-- End Article Page -->
19 changes: 19 additions & 0 deletions integration-tests/site/_posts/2024-02-06-welcome-to-roq.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: post
title: "Welcome to Roq!"
date: 2024-02-06 13:32:20 +0300
description: You’ll find this post in your `site/_posts` directory. Go ahead and edit it and re-build the site to see your changes. # Add post description (optional)
img: iamroq.png # Add image post (optional)
---

You’ll find this post in your `site/_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `quarkus dev`, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the `site/_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Qute also offers powerful support for code snippets:


Check out the [Roq docs][roq-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Roq’s GitHub repo][jekyll-gh].

[roq-docs]: https://docs.quarkiverse.io/quarkus-roq/dev/index.html
[roq-gh]: https://github.com/quarkiverse/quarkus-roq
Loading

0 comments on commit 4f3fae1

Please sign in to comment.