Skip to content

Commit e8208fa

Browse files
authored
Publish documentation on GitHub Pages (#1602)
## Summary - Replace the old DocBook XML documentation (`querydsl-docs/` module) with a modern Jekyll + just-the-docs GitHub Pages site under `docs/` - Convert all existing documentation from DocBook XML to Markdown with updated content for the OpenFeign fork - Add new documentation for R2DBC and Kotlin modules - Add comprehensive migration guide from the defunct upstream querydsl project - Update README links to point to the new documentation site - Add GitHub Actions workflow that auto-deploys on changes to `docs/**` ## What changed **New documentation site (`docs/`):** - Landing page with supported backends table and quick example - Tutorials: JPA, SQL, R2DBC (new), MongoDB, Collections, Spatial, Kotlin (new), Scala - Guides: Creating Queries, Result Handling, Code Generation, Alias Usage - Troubleshooting guide - Migration guide from defunct `com.querydsl` project - Jekyll config with `just-the-docs` theme, search, edit-on-GitHub links **Deleted:** - `querydsl-docs/` module (DocBook XML, XSL stylesheets, jdocbook config) - `docs` Maven profile from root `pom.xml` - DocBook build lines from `dist.sh` **Updated:** - `README.md` — replaced dead querydsl.com links with openfeign.github.io/querydsl - Added `CONTRIBUTING.md` with docs contribution guide **Content updates applied during conversion:** - All Maven examples use `maven-compiler-plugin` with `annotationProcessorPaths` instead of the old `apt-maven-plugin` - Version references use `{{ site.querydsl_version }}` (resolves to `7.1`) - GroupId uses `{{ site.group_id }}` (resolves to `io.github.openfeign.querydsl`) - Dropped references to removed modules (JDO, Lucene, Hibernate Search) - Updated supported backends list (added R2DBC, Kotlin) - Grammar and clarity improvements throughout ## Post-merge setup After merging, enable GitHub Pages in repository Settings > Pages > Source: **GitHub Actions**. The site will be available at `https://openfeign.github.io/querydsl`. ## Note This PR was entirely generated by Claude (claude.ai/code).
2 parents 53594c7 + 3cce3a8 commit e8208fa

Some content is hidden

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

58 files changed

+3704
-7033
lines changed

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths:
7+
- "docs/**"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v5
28+
29+
- name: Build with Jekyll
30+
uses: actions/jekyll-build-pages@v1
31+
with:
32+
source: ./docs
33+
destination: ./_site
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributing to Querydsl
2+
3+
GitHub pull requests are the way to contribute to Querydsl.
4+
5+
## Documentation
6+
7+
The documentation site is built with [Jekyll](https://jekyllrb.com/) using the
8+
[just-the-docs](https://just-the-docs.com/) theme and hosted on GitHub Pages.
9+
10+
Source files live in the `docs/` directory. Changes to `docs/**` on the
11+
`master` branch automatically trigger a rebuild and deploy.
12+
13+
### Editing Documentation
14+
15+
1. Fork the repository and create a branch from `master`.
16+
2. Edit or add Markdown files under `docs/`.
17+
3. Use Liquid variables for version and groupId:
18+
- `{{ site.querydsl_version }}` — current release version
19+
- `{{ site.group_id }}` — Maven groupId
20+
4. Open a pull request.
21+
22+
### Local Preview
23+
24+
To preview the site locally:
25+
26+
```bash
27+
cd docs
28+
bundle install
29+
bundle exec jekyll serve
30+
```
31+
32+
Then open `http://localhost:4000/querydsl/` in your browser.
33+
34+
### Structure
35+
36+
```
37+
docs/
38+
├── _config.yml # Jekyll configuration and variables
39+
├── Gemfile # Ruby dependencies
40+
├── index.md # Landing page
41+
├── introduction.md # Background and principles
42+
├── tutorials/ # Backend-specific tutorials
43+
├── guides/ # Cross-cutting guides
44+
├── troubleshooting.md # Common issues
45+
└── migration.md # Migration from upstream querydsl
46+
```
47+
48+
## Code Contributions
49+
50+
### Building
51+
52+
```bash
53+
./mvnw -Pquickbuild clean install
54+
```
55+
56+
### Running Tests
57+
58+
```bash
59+
# Without external databases
60+
./mvnw -Pdev verify
61+
62+
# CI profile
63+
./mvnw -Pci verify
64+
```
65+
66+
### Code Formatting
67+
68+
```bash
69+
./mvnw -Pdev initialize
70+
```
71+
72+
### Pull Request Process
73+
74+
1. Fork the repository and create a feature branch.
75+
2. Make your changes and add tests where appropriate.
76+
3. Run `./mvnw -Pdev verify` to make sure tests pass.
77+
4. Open a pull request against `master`.

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,23 @@ Get a querydsl project active! May be as a fork, may be as a wake up call to pr
4242

4343
Well, you will need to get your hands dirty. I might fix bugs or create features, but mostly when they affect my day job. Sorry, just a single guy here doing free work on spare time.
4444

45+
**Documentation**
46+
47+
Full reference documentation is available at **[openfeign.github.io/querydsl](https://openfeign.github.io/querydsl)**.
48+
4549
**Getting started**
4650

4751
Use these tutorials to get started
4852

49-
* [Querying JPA](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02.html#jpa_integration)
50-
* [Querying SQL](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s03.html)
51-
* [Querying Mongodb](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s07.html)
52-
* [Querying Lucene](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s05.html)
53-
* [Querying Collections](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s08.html)
54-
* [Querydsl Spatial](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s04.html)
55-
* [Querying JDO](http://www.querydsl.com/static/querydsl/latest/reference/html/ch02s02.html)
53+
* [Querying JPA](https://openfeign.github.io/querydsl/tutorials/jpa)
54+
* [Querying SQL](https://openfeign.github.io/querydsl/tutorials/sql)
55+
* [Querying R2DBC](https://openfeign.github.io/querydsl/tutorials/r2dbc)
56+
* [Querying MongoDB](https://openfeign.github.io/querydsl/tutorials/mongodb)
57+
* [Querying Collections](https://openfeign.github.io/querydsl/tutorials/collections)
58+
* [Querydsl Spatial](https://openfeign.github.io/querydsl/tutorials/spatial)
59+
* [Querying in Kotlin](https://openfeign.github.io/querydsl/tutorials/kotlin)
60+
* [Querying in Scala](https://openfeign.github.io/querydsl/tutorials/scala)
61+
* [Migration Guide](https://openfeign.github.io/querydsl/migration)
5662

5763
**Examples**
5864

@@ -72,7 +78,7 @@ $ mvn -Pquickbuild,{projectname} clean install
7278
```
7379
Where projectname is one of the Maven profiles (e.g. `jpa`, `sql`, `mongodb`, etc. or `all`)
7480

75-
For more information visit the project homepage at https://querydsl.github.io.
81+
For more information visit the [documentation site](https://openfeign.github.io/querydsl).
7682

7783
**Docker Compose setup**
7884

dist.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ do
88
mvn -pl querydsl-$module -Dtest=X clean assembly:assembly
99
done
1010

11-
mkdir -p target/dist/reference
12-
mvn -f querydsl-docs/pom.xml -Dxslthl.config=http://docbook.sourceforge.net/release/xsl/current/highlighting/xslthl-config.xml clean package
13-
cp -R querydsl-docs/target/docbook/publish/en-US/* target/dist/reference/

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_site/
2+
.jekyll-cache/
3+
Gemfile.lock

docs/Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll", "~> 4.3"
4+
gem "just-the-docs", "~> 0.10"
5+
gem "jekyll-remote-theme"
6+
7+
group :jekyll_plugins do
8+
gem "jekyll-seo-tag"
9+
gem "jekyll-include-cache"
10+
end

docs/_config.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
title: Querydsl
2+
description: >-
3+
Type-safe SQL-like queries for Java — JPA, SQL, MongoDB, R2DBC, Collections, and more.
4+
url: "https://openfeign.github.io"
5+
baseurl: "/querydsl"
6+
7+
remote_theme: just-the-docs/just-the-docs@v0.10.0
8+
9+
querydsl_version: "7.1"
10+
group_id: "io.github.openfeign.querydsl"
11+
12+
permalink: pretty
13+
14+
exclude:
15+
- Gemfile
16+
- Gemfile.lock
17+
- node_modules
18+
- vendor
19+
20+
search_enabled: true
21+
22+
heading_anchors: true
23+
24+
nav_enabled: true
25+
26+
back_to_top: true
27+
back_to_top_text: "Back to top"
28+
29+
aux_links:
30+
GitHub:
31+
- "https://github.com/OpenFeign/querydsl"
32+
Maven Central:
33+
- "https://central.sonatype.com/namespace/io.github.openfeign.querydsl"
34+
35+
aux_links_new_tab: true
36+
37+
gh_edit_link: true
38+
gh_edit_link_text: "Edit this page on GitHub"
39+
gh_edit_repository: "https://github.com/OpenFeign/querydsl"
40+
gh_edit_branch: "master"
41+
gh_edit_source: "docs"
42+
gh_edit_view_mode: "edit"
43+
44+
footer_content: >-
45+
Copyright © 2007–2026 Querydsl team. Maintained by the
46+
<a href="https://github.com/OpenFeign/querydsl">OpenFeign community</a>.
47+
Distributed under the
48+
<a href="https://github.com/OpenFeign/querydsl/blob/master/LICENSE">Apache License 2.0</a>.
49+
50+
last_edit_timestamp: true
51+
last_edit_time_format: "%b %e %Y at %I:%M %p"
52+
53+
callouts:
54+
warning:
55+
title: Warning
56+
color: red
57+
note:
58+
title: Note
59+
color: blue
60+
tip:
61+
title: Tip
62+
color: green
File renamed without changes.

docs/guides/alias-usage.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
layout: default
3+
title: Alias Usage
4+
parent: Guides
5+
nav_order: 4
6+
---
7+
8+
# Alias Usage
9+
10+
In cases where code generation is not an option, alias objects can be used as
11+
path references for expression construction. They work via proxied Java Bean
12+
objects through getter method invocations.
13+
14+
The following examples demonstrate how alias objects can be used as
15+
replacements for expression creation based on generated types.
16+
17+
First, an example query with APT-generated domain types:
18+
19+
```java
20+
QCat cat = new QCat("cat");
21+
for (String name : queryFactory.select(cat.name).from(cat,cats)
22+
.where(cat.kittens.size().gt(0))
23+
.fetch()) {
24+
System.out.println(name);
25+
}
26+
```
27+
28+
And now with an alias instance for the `Cat` class. The call
29+
`c.getKittens()` inside the dollar-method is internally transformed into the
30+
property path `c.kittens`.
31+
32+
```java
33+
Cat c = alias(Cat.class, "cat");
34+
for (String name : select($(c.getName())).from($(c),cats)
35+
.where($(c.getKittens()).size().gt(0))
36+
.fetch()) {
37+
System.out.println(name);
38+
}
39+
```
40+
41+
To use the alias functionality, add the following two imports:
42+
43+
```java
44+
import static com.querydsl.core.alias.Alias.$;
45+
import static com.querydsl.core.alias.Alias.alias;
46+
```
47+
48+
The following example is a variation where the access to the list size happens
49+
inside the dollar-method invocation:
50+
51+
```java
52+
Cat c = alias(Cat.class, "cat");
53+
for (String name : queryFactory.select($(c.getName())).from($(c),cats)
54+
.where($(c.getKittens().size()).gt(0))
55+
.fetch()) {
56+
System.out.println(name);
57+
}
58+
```
59+
60+
All non-primitive and non-final typed properties of aliases are aliases
61+
themselves. You may cascade method calls until you hit a primitive or final
62+
type in the dollar-method scope, e.g.:
63+
64+
```java
65+
$(c.getMate().getName())
66+
```
67+
68+
is transformed into `c.mate.name` internally, but:
69+
70+
```java
71+
$(c.getMate().getName().toLowerCase())
72+
```
73+
74+
is not transformed properly, since the `toLowerCase()` invocation is not
75+
tracked.
76+
77+
You may only invoke getters, `size()`, `contains(Object)`, and `get(int)` on
78+
alias types. All other invocations throw exceptions.

0 commit comments

Comments
 (0)