-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New gh-pages site for all poiu-de java projects
- Loading branch information
0 parents
commit c9edc12
Showing
75 changed files
with
4,855 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # Set a branch to deploy | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.123.6' | ||
extended: true | ||
|
||
- name: Build | ||
working-directory: ./site | ||
run: hugo --minify --destination ../public | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/site/public/ | ||
/site/resources/_gen/ | ||
/site/.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "site/themes/compose"] | ||
path = site/themes/compose | ||
url = https://github.com/poiu-de/compose.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
poiu-de site | ||
============ | ||
|
||
This is the source for the poiu-de.github.io site with the documentation of the poiu.de Java libraries. | ||
|
||
|
||
Publishing | ||
----------- | ||
|
||
To publish the site | ||
|
||
1. Clone it | ||
``` | ||
git clone [email protected]:poiu-de/poiu-de.github.io | ||
``` | ||
|
||
1. Update the hugo theme (as a git submodule) | ||
``` | ||
git submodule update --init --recursive | ||
``` | ||
2. Make the intended changes | ||
3. Push it | ||
``` | ||
git push | ||
``` | ||
4. Github actions will then built the site with hugo and publish it on github pages. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
baseURL = "https://poiu-de.github.io/" | ||
title = "poiu – Java Libraries" | ||
enableRobotsTXT = true | ||
# this example loads the theme as hugo module | ||
# comment out line below, and uncomment the line after it if you prefer to load the theme normally | ||
#theme = ["github.com/onweru/compose"] # edit this if you'ld rather use a fork of this repo | ||
theme = "compose" | ||
enableGitInfo = true | ||
|
||
disableKinds = ["taxonomy"] | ||
|
||
[outputs] | ||
home = ["HTML", "RSS","JSON"] | ||
|
||
[[menu.main]] | ||
name = "Apron" | ||
weight = 2 | ||
pageRef = "apron/" | ||
[[menu.main.params]] | ||
iconLight = "/images/apron-wide.svg" | ||
iconDark = "/images/apron-wide-dark.svg" | ||
[[menu.main]] | ||
name = "Kilt" | ||
weight = 3 | ||
pageRef = "kilt/" | ||
[[menu.main.params]] | ||
iconLight = "/images/kilt-wide.svg" | ||
iconDark = "/images/kilt-wide-dark.svg" | ||
[[menu.main]] | ||
name = "Coat" | ||
weight = 4 | ||
pageRef = "coat/" | ||
[[menu.main.params]] | ||
iconLight = "/images/coat-wide.svg" | ||
iconDark = "/images/coat-wide-dark.svg" | ||
|
||
[markup] | ||
[markup.goldmark] | ||
[markup.goldmark.renderer] | ||
unsafe = true | ||
[markup.goldmark.extensions] | ||
typographer = false | ||
[markup.highlight] | ||
codeFences = true | ||
guessSyntax = false | ||
hl_Lines = "" | ||
lineNoStart = 1 | ||
lineNos = true | ||
lineNumbersInTable = false | ||
noClasses = false | ||
style = "monokai" | ||
tabWidth = 2 | ||
[markup.tableOfContents] | ||
endLevel = 4 | ||
ordered = false | ||
startLevel = 2 | ||
|
||
# Everything below this are Site Params | ||
|
||
[params] | ||
last_stable_apron_version = "2.1.1" | ||
last_stable_kilt_version = "1.0.2" | ||
last_stable_coat_version = "1.0.0" | ||
apron_repo_url = "https://github.com/poiu-de/apron" | ||
kilt_repo_url = "https://github.com/poiu-de/kilt" | ||
coat_repo_url = "https://github.com/poiu-de/coat" | ||
|
||
docSections = ["apron", "kilt", "coat"] | ||
uniqueHomePage = true # change to false to add sidebar to homepage | ||
repo = "https://github.com/poiu-de/compose" | ||
|
||
time_format_blog = "Monday, January 02, 2006" | ||
time_format_default = "January 2, 2006" | ||
enableDarkMode = true # set to false to disable darkmode by default # user will still have the option to use dark mode | ||
|
||
# sets the maximum number of lines per codeblock. The codeblock will however be scrollable and expandable. | ||
codeMaxLines = 25 | ||
|
||
# disable showing line numbers by default. Switch to `true` if you'd rather have them on. | ||
codeLineNumbers = false | ||
|
||
# Site logo | ||
[params.logo] | ||
lightMode = "images/poiu-big.svg" | ||
darkMode = "images/poiu-big.svg" | ||
|
||
#[params.source] | ||
# name = "GitHub" | ||
# iconLight = "images/GitHubMarkLight.svg" | ||
# iconDark = "images/GitHubMarkDark.svg" | ||
# url = "https://github.com/poiu-de/" | ||
|
||
# optional | ||
# attribution. Feel free to delete this | ||
[params.author] | ||
name = "poiu.de" | ||
url = "https://github.com/poiu-de" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: "poiu" | ||
--- | ||
|
||
# poiu – Libraries for Java | ||
|
||
{{< feature-container >}} | ||
{{< feature icon="images/apron.svg" label="Apron" url="apron">}} | ||
Read and write Java .properties files in a more sane manner | ||
{{< /feature >}} | ||
|
||
{{< feature icon="images/kilt.svg" label="Kilt" url="kilt" >}} | ||
Easier handling of Java i18n resource bundles | ||
{{< /feature >}} | ||
|
||
{{< feature icon="images/coat.svg" label="Coat" url="coat" >}} | ||
Type safe config objects for Java | ||
{{< /feature >}} | ||
{{< /feature-container >}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
title: "Apron — Advanced Properties" | ||
description: "Read and write Java .properties files in a more sane manner" | ||
github_repo: "https://github.com/poiu-de/apron" | ||
extra_menu_items: | ||
- javadoc: | ||
label: "Javadoc" | ||
url: "https://javadoc.io/doc/de.poiu.apron/apron" | ||
icon: "devicon-java-plain" | ||
--- | ||
|
||
# A better API for accessing Java .properties files | ||
|
||
Apron is a library for providing a developer-friendly way for reading and | ||
writing Java .properties files. In particular it supports writing changes to | ||
a .properties file in the least intrusive way possible. | ||
|
||
|
||
## Short Usage | ||
|
||
{{< block "grid-3" >}} | ||
{{< column >}} | ||
1. Provide a .properties file | ||
```properties | ||
## Apron example ## | ||
|
||
# The appName can be changed in-app | ||
appName = My shiny app | ||
|
||
# The default port is 5040. | ||
# Change it if necessary | ||
#listenPort = 5040 | ||
|
||
# This description is only visible in | ||
# the "About" dialog. | ||
description = Only a \ | ||
test project | ||
|
||
|
||
|
||
``` | ||
{{< /column >}} | ||
|
||
{{< column >}} | ||
|
||
2. Read it and modify some entries | ||
```java | ||
import de.poiu.apron.PropertyFile; | ||
|
||
|
||
final File file= new File("application.properties"); | ||
final PropertyFile propertyFile= PropertyFile.from(file); | ||
|
||
// Read the value of the key "appName" | ||
final String appName= propertyFile.get("appName"); | ||
|
||
// Change the value of "appName" to a new value | ||
propertyFile.set("appName", "My brilliant app"); | ||
|
||
// Write the PropertyFile back to file | ||
// by only updating the modified values | ||
propertyFile.update(file); | ||
} | ||
``` | ||
|
||
{{< /column >}} | ||
|
||
{{< column >}} | ||
3. Read the result | ||
```properties | ||
## Apron example ## | ||
|
||
# The appName can be changed in-app | ||
appName = My brilliant app | ||
|
||
# The default port is 5040. | ||
# Change it if necessary | ||
#listenPort = 5040 | ||
|
||
# This description is only visible in | ||
# the "About" dialog. | ||
description = Only a \ | ||
test project | ||
|
||
|
||
|
||
``` | ||
{{< /column >}} | ||
{{< /block >}} | ||
|
||
|
||
## License | ||
|
||
Apron is licensed under the terms of the [Apache license 2.0](http://www.apache.org/licenses/LICENSE-2.0). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Quick Start | ||
weight: 1 | ||
--- | ||
|
||
## Prerequisites | ||
|
||
Apron has no runtime dependencies on other libraries. | ||
|
||
Apron can be used with Java 8 or higher. | ||
|
||
|
||
## Installation | ||
|
||
To use Apron in a maven based project use the following maven coordinates: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>de.poiu.apron</groupId> | ||
<artifactId>apron</artifactId> | ||
<version>{{< param last_stable_apron_version >}}</version> | ||
</dependency> | ||
``` | ||
|
||
Otherwise download the jar-file of Apron from the | ||
[Github Release page]({{< param apron_repo_url >}}/releases) | ||
and put it into the classpath of your application. | ||
|
||
## Usage | ||
|
||
Create a `de.poiu.apron.PropertyFile` object from the content of a | ||
.properties file. | ||
|
||
### Reading a .properties file | ||
|
||
Apron is fully compatible with the format supported by | ||
`java.util.Properties`, but allows accessing the key value pairs in a | ||
more developer-friendly way. | ||
|
||
``` java | ||
// Read the file "application.properties" into a PropertyFile | ||
final PropertyFile propertyFile= PropertyFile.from( | ||
new File("application.properties")); | ||
|
||
// Read the value of the key "someKey" | ||
final String someValue= propertyFile.get("someKey"); | ||
``` | ||
|
||
### Writing changes to a .properties file back | ||
|
||
Even more important than reading is writing changes back into a .properties file. | ||
Other than `java.util.Properies` Apron does retain | ||
|
||
- the order of all entries | ||
|
||
- all empty lines | ||
|
||
- all comment lines | ||
|
||
- and even the formatting of unchanged entries | ||
|
||
```java | ||
// Set the value of "someKey" to a new value | ||
propertyFile.set("someKey", "aNewValue"); | ||
|
||
// Write the PropertyFile back to file by only updating the modified values | ||
propertyFile.update(new File("application.properties")); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: 1.0.0 | ||
--- | ||
|
||
- Initial release of Apron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: 2.0.0 | ||
--- | ||
|
||
- Added functionality to reformat and reorder the entries in a PropertyFile | ||
|
||
- Renamed `de.poiu.apron.Options` to `de.poiu.apron.ApronOptions` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: 2.0.1 | ||
--- | ||
|
||
- Escape newlines to literal newlines | ||
|
||
- When checking for value changes compare unescaped values | ||
|
||
- Escape backslashes when escaping | ||
|
Oops, something went wrong.