Skip to content

Commit d93b5d3

Browse files
authored
Merge pull request #95 from jchunk-io/dev/pablosanchi/issue-77
feat(issue-77): antora docs
2 parents 496a574 + 6ea5e92 commit d93b5d3

File tree

9 files changed

+169
-2
lines changed

9 files changed

+169
-2
lines changed

.github/workflows/docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Antora to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'docs/**'
8+
- 'antora-playbook.yml'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: Build Antora site
37+
run: |
38+
npx -y -p @antora/cli@3.1 -p @antora/site-generator@3.1 antora -r @antora/site-generator antora-playbook.yml
39+
40+
- name: Upload Pages artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: build/site
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,23 @@ To check javadocs using the javadoc:javadoc
5555
./mvnw javadoc:javadoc -Pjavadoc
5656
```
5757

58+
## Building the docs locally
59+
60+
You can build and preview the Antora documentation locally without installing anything globally.
61+
62+
Prerequisites:
63+
- Node.js 18+ (20 recommended).
64+
- Download from https://nodejs.org/
65+
66+
Build the site:
67+
68+
```sh
69+
npx -y -p @antora/cli@3.1 -p @antora/site-generator@3.1 antora -r @antora/site-generator antora-playbook.yml
70+
```
71+
72+
Open the generated site:
73+
- `build/site/index.html`
74+
5875
## Contributing
5976

6077
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

antora-playbook.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
site:
2+
title: JChunk Docs
3+
start_page: jchunk::index.adoc
4+
5+
content:
6+
sources:
7+
- url: .
8+
start_path: docs
9+
branches: HEAD
10+
11+
ui:
12+
bundle:
13+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
14+
snapshot: false
15+
supplemental_files: docs/ui
16+
17+
asciidoc:
18+
attributes:
19+
page-pagination: ''
20+
21+
runtime:
22+
fetch: true
23+
24+
output:
25+
dir: build/site

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Jchunk
1+
name: jchunk
22
version:
33
v(?<version>+({0..9}).+({0..9}).+({0..9})): $<version>
44
early-access: snapshot

docs/ui/layouts/default.hbs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
{{> head}}
5+
</head>
6+
<body>
7+
<header class="navbar" role="banner">
8+
<div class="container">
9+
{{> header-content}}
10+
</div>
11+
</header>
12+
13+
<main id="content" class="container" role="main">
14+
{{#if page.title}}
15+
<h1 class="page-title">{{page.title}}</h1>
16+
{{/if}}
17+
<article class="doc">
18+
{{{page.contents}}}
19+
</article>
20+
</main>
21+
22+
<footer class="footer" role="contentinfo">
23+
<div class="container">
24+
{{> footer-content}}
25+
</div>
26+
</footer>
27+
</body>
28+
</html>

docs/ui/layouts/home.hbs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
{{> head}}
5+
</head>
6+
<body>
7+
<header class="navbar" role="banner">
8+
<div class="container">
9+
{{> header-content}}
10+
</div>
11+
</header>
12+
13+
<main id="content" class="container" role="main">
14+
{{#if page.title}}
15+
<h1 class="page-title">{{page.title}}</h1>
16+
{{/if}}
17+
<article class="doc home">
18+
{{{page.contents}}}
19+
</article>
20+
</main>
21+
22+
<footer class="footer" role="contentinfo">
23+
<div class="container">
24+
{{> footer-content}}
25+
</div>
26+
</footer>
27+
</body>
28+
</html>

docs/ui/partials/head.hbs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<title>{{#if page.title}}{{page.title}} | {{/if}}{{#if site.title}}{{site.title}}{{else}}Documentation{{/if}}</title>
5+
<link rel="stylesheet" href="{{uiRootPath}}/assets/styles.css">
6+
<script defer src="{{uiRootPath}}/assets/site.js"></script>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="nav">
2+
<a class="back-btn" href="{{siteRootPath}}/" aria-label="Go back" onclick="if (history.length > 1) { history.back(); return false; }">
3+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11 2.5a.75.75 0 0 1 0 1.06L6.56 8l4.44 4.44a.75.75 0 0 1-1.06 1.06l-5-5a.75.75 0 0 1 0-1.06l5-5a.75.75 0 0 1 1.06 0z"/></svg>
4+
</a>
5+
<div class="brand">
6+
<a class="logo" href="{{siteRootPath}}/"></a>
7+
<a class="title" href="{{siteRootPath}}/">{{#if site.title}}{{site.title}}{{else}}Documentation{{/if}}</a>
8+
</div>
9+
</div>

jchunk-semantic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SemanticChunker
22

33
Splits text into chunks based on **semantic similarity** using embeddings.
4-
Instead of relying only on character counts or delimiters, it groups sentences into coherent chunks that better preserve meaning useful for **RAG pipelines**, **semantic search**, and **embedding-based retrieval**.
4+
Instead of relying only on character counts or delimiters, it groups sentences into coherent chunks that better preserve meaning, useful for **RAG pipelines**, **semantic search**, and **embedding-based retrieval**.
55

66
## Installing
77

0 commit comments

Comments
 (0)