Skip to content
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
93c645f
Add social icons in header
haneepark Sep 5, 2025
5ef4cb5
Update footer copyright
haneepark Sep 5, 2025
fd20e73
Change navbar logo to comply with design guidelines
haneepark Sep 5, 2025
f116e5f
Update footer
haneepark Sep 5, 2025
f43fa28
Fix internal links and redirect configuration
haneepark Sep 4, 2025
d0623a0
Handle redirection on the /news page
haneepark Sep 4, 2025
2514197
Add the StarBegging component
haneepark Sep 10, 2025
7923855
Add the CookieConsent component
haneepark Sep 11, 2025
831ea95
Add the StarBegging and CookieConsent components to Layout
haneepark Sep 11, 2025
843ebb1
Use Docusaurus's Client API rather than browser API (such as window.l…
haneepark Sep 11, 2025
0047522
Implement the custom footer
haneepark Sep 11, 2025
c9e4f00
Add blog posts
haneepark Sep 11, 2025
2265325
Use self-hosted images
haneepark Sep 16, 2025
69f6cf8
Fix format issues in blog postings
haneepark Sep 16, 2025
a055047
Edit relative blog post links and footnotes
haneepark Sep 16, 2025
cdbc1ed
Add images' background and change font colors for dark mode support
haneepark Sep 16, 2025
8a1e6ab
Fix speakerdeck import script
haneepark Sep 16, 2025
72454bd
Show blog post links in other languages
haneepark Sep 16, 2025
55fc205
Fix broken links and let the build pass on broken links
haneepark Sep 16, 2025
db6b8a7
Move the design/ resources directory under src/
haneepark Sep 18, 2025
0387577
Move the MDX resources directories under src/content
haneepark Sep 18, 2025
65fd201
Remove test pages
haneepark Sep 19, 2025
ade144c
Correct relative links in a blog post
haneepark Sep 19, 2025
707b39e
Add release-note.ts and install dependencies
haneepark Sep 19, 2025
56b6fff
Add a version heading and filter out the dependabot from release notes
haneepark Sep 19, 2025
d22d9d5
Tidy up docusaurus.config.ts
haneepark Sep 22, 2025
aa33c44
Implement the short url plugin
haneepark Sep 23, 2025
9462603
Add the gtag plugin for GA integration and add manual tracking for sh…
haneepark Sep 24, 2025
1a9e3f5
Add npm script for build:dev and fix link issues
haneepark Sep 24, 2025
bbb2c65
Fix React hydration issues
haneepark Sep 25, 2025
ea6aafd
Configure SEO and PWA
Nov 5, 2025
2d4f1fb
Update Docusaurus version to 3.9.2
Nov 5, 2025
e49d375
Reflect site updates
Nov 5, 2025
665dc56
Update node version requirement
haneepark Nov 20, 2025
42dda6f
docs: fix incorrect filename in BlogPostRequestConverter code block
haneepark Nov 26, 2025
8e12e86
Add a plugin and a script for generating RSS feed
haneepark Dec 2, 2025
7ebb413
Apply a custom 404 page
haneepark Dec 2, 2025
fbdf79b
Remove an unnecessary class in the footer
haneepark Dec 2, 2025
92e019c
Release notes for 1.34.0
haneepark Dec 3, 2025
3dd04bc
Bump dependencies
haneepark Dec 3, 2025
764c676
Add Algolia site verification
haneepark Dec 3, 2025
de46f50
Release notes for 1.34.1
haneepark Dec 4, 2025
7b5de92
Add build.gradle
minwoox Dec 8, 2025
991d48b
Remove svgbob_cli
minwoox Dec 8, 2025
27057fc
Lint
minwoox Dec 8, 2025
d347f7d
Remove site from settings.gradle
minwoox Dec 8, 2025
3cda3a8
LInt again
minwoox Dec 8, 2025
f322b53
update readme
minwoox Dec 8, 2025
b231b62
npm install
minwoox Dec 8, 2025
c53fa24
Try clean and increase heap size
minwoox Dec 8, 2025
fb8ae7d
Try
minwoox Dec 8, 2025
c4d8a85
Downgrade
minwoox Dec 8, 2025
fd4eafe
upload npm logs
minwoox Dec 8, 2025
2cef50c
Add npmrc
minwoox Dec 8, 2025
031f6a1
Apply Code Rabbit's feedback
haneepark Dec 9, 2025
ae7a9ae
Prevent layout shift for navbar logo
haneepark Dec 9, 2025
42b30b4
Update site-new/src/components/short-url-redirect.tsx
haneepark Dec 9, 2025
bc4f24e
Fix lint issues
haneepark Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ includeWithFlags ':docs-client'

// Site generation project
includeWithFlags ':site'
includeWithFlags ':site-new'

// Examples
includeWithFlags ':examples:annotated-http-service', 'java11'
Expand Down
12 changes: 11 additions & 1 deletion site-new/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ $ USE_SSH=true npm run deploy
Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
$ GIT_USER=<Your GitHub username> npm run deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

### Generating release notes

```console
$ npm run release-note <version>
```

Note that you might encounter an API rate limit exceeded error from the GitHub response.
Set `GITHUB_ACCESS_TOKEN` environment variable with the token that you have
issued in https://github.com/settings/tokens to get a higher rate limit.
9 changes: 0 additions & 9 deletions site-new/blog/en/a-blog-post.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions site-new/blog/en/customizing-armeria-metrics.mdx

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions site-new/blog/ja/a-blog-post.mdx

This file was deleted.

7 changes: 0 additions & 7 deletions site-new/blog/ko/a-blog-post.mdx

This file was deleted.

236 changes: 236 additions & 0 deletions site-new/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
import groovy.json.JsonBuilder
import groovy.json.JsonSlurper
import org.jsoup.Jsoup

import java.nio.file.Files
import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
import java.util.stream.Collectors

buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath libs.jsoup
}
}

plugins {
id 'base'
alias(libs.plugins.node.gradle)
}

node {
version = '24.11.1'
npmVersion = '11.6.2'
download = true
npmInstallCommand = "ci"
}

tasks.register('npmClean', NpmTask) {
dependsOn tasks.npmInstall
args = ['run', 'clear']
}

// Note that we didn't make `clean` depend on `npmClean`,
// because otherwise `clean` will trigger `npmInstall`.
tasks.clean.delete(project.file("${project.projectDir}/.docusaurus"))
tasks.clean.delete(project.file("${project.projectDir}/gen-src"))
tasks.clean.delete(project.file("${project.projectDir}/build"))
tasks.clean.delete(project.file("${project.projectDir}/node_modules/.cache"))

tasks.register('versionIndex', VersionIndexTask)
tasks.register('apiIndex', ApiIndexTask) {
dependsOn ':javadoc:javadoc'
}
tasks.register('contributorList', ContributorListTask)

tasks.register('generateSiteSources') {
dependsOn tasks.npmInstall
dependsOn tasks.versionIndex
dependsOn tasks.apiIndex
dependsOn tasks.contributorList
}

tasks.register('develop', NpmTask) {
dependsOn tasks.generateSiteSources
args = ['run', 'start']
}

tasks.register('eslint', NpmTask) {
dependsOn tasks.generateSiteSources
args = ['run', 'lint']
inputs.dir('src')
inputs.file('.eslintrc.js')
inputs.file('package.json')
inputs.file('package-lock.json')
}

// 'siteLint' could run separately regardless of '-PnoLint' option
tasks.register('siteLint') {
dependsOn tasks.eslint
}

// Note that this task is not triggered by the 'build' task
// because it takes long to build a site.
tasks.register('site', NpmTask) {
dependsOn tasks.generateSiteSources
if (!rootProject.hasProperty('noLint')) {
dependsOn tasks.siteLint
}
args = ['run', 'build']
inputs.dir('src')
inputs.file('docusaurus.config.ts')
inputs.file('package.json')
inputs.file('package-lock.json')
inputs.file('tsconfig.json')
outputs.dir('.docusaurus')
outputs.dir('build')
}

class VersionIndexTask extends DefaultTask {

@Input
final def version = project.property('version')
@Input
final def managedVersions = project.property('managedVersions') as Map
@OutputFile
final def versionIndexFile = project.file("${project.projectDir}/gen-src/versions.json")

@TaskAction
def run() {
def info = new TreeMap(this.managedVersions)
info["${project.group}:armeria-bom"] = version

versionIndexFile.withPrintWriter('UTF-8') { out ->
out.println(new JsonBuilder(info).toPrettyString())
}
}
}

class ApiIndexTask extends DefaultTask {

@InputDirectory
final def javadocDir = project.file("${project.rootProject.projectDir}/javadoc/build/docs/javadoc")
@OutputFile
final def nameToHrefFile = project.file("${project.projectDir}/gen-src/api-index.json")

@TaskAction
def run() {
def javadocPath = javadocDir.toPath()
def nameToHref = Files.walk(javadocPath).filter({ path ->
if (Files.isDirectory(path)) {
return false
}

return path.getName(path.nameCount - 1).toString().matches(/[A-Z][a-zA-Z0-9._$]+\.html/)
}).sorted().flatMap({ path ->
def relativePath = "${javadocPath.relativize(path)}".replace(File.separator, '/')
def fqcn = relativePath[0..-6].replace('/', '.')
def href = "https://javadoc.io/doc/com.linecorp.armeria/armeria-javadoc/latest/${relativePath}"

def result = []
result.add([fqcn, href])

def simpleClassName = fqcn.substring(fqcn.lastIndexOf('.') + 1)
result.add([simpleClassName, href])

def doc = Jsoup.parse(path.toFile(), 'UTF-8')
doc.select(""".constant-details .member-list .detail,
.constructor-details .member-list .detail,
.field-details .member-list .detail,
.method-details .member-list .detail""").each {
def methodSignature = it.attr("id")
def hrefWithMethod = href + '#' + methodSignature

def split = methodSignature.split('\\(|\\)|,')
if (split.length != 1) {
// Make the type of parameters from FQCN to Simple class name in order to use as a key.
def parameters = ''
for (int i = 1; i < split.length; i++) {
// Remove the trailing '...' in varargs
def p = split[i].replaceAll(/\.+$/, '')
parameters += ',' + p.substring(p.lastIndexOf('.') + 1)
}
methodSignature = split[0] + '(' + parameters.substring(1) + ')'
}

result.add([fqcn + '#' + methodSignature, hrefWithMethod])
result.add([simpleClassName + '#' + methodSignature, hrefWithMethod])
}

return result.stream()
}).collect(Collectors.toMap({ e -> e[0] }, { e -> e[1] }, { a, b -> a }, { new TreeMap()}))


nameToHrefFile.withPrintWriter('UTF-8') { out ->
out.println(new JsonBuilder(nameToHref).toPrettyString())
}
}
}

class ContributorListTask extends DefaultTask {
// Rebuild up to once an hour, unless cleaned.
@Input
final def hourOfDay = System.currentTimeMillis() / TimeUnit.HOURS.toMillis(1)
@OutputFile
final def contributorsFile = project.file("${project.projectDir}/gen-src/contributors.json")

@TaskAction
def run() {
def contributors = new TreeMap<String, String>()
def accessToken = project.findProperty('githubToken')
def url = 'https://api.github.com/repos/line/armeria/contributors'
def nextPattern = Pattern.compile(/<(https:\/\/api\.github\.com\/[^>]+)>; rel="next"/)
for (def i = 0; i < 10; i++) {
def req = new URL(url).openConnection()
if (accessToken?.trim()) {
req.setRequestProperty('Authorization', "token ${accessToken}")
}
def resText = req.getInputStream().getText()
if (req.getResponseCode() != 200) {
if (req.getHeaderFieldInt('X-RateLimit-Remaining', Integer.MAX_VALUE) <= 0) {
throw new Exception('Exceeded Github API rate limit. ' +
'Specify "-PgithubToken=<personalAccessToken>" option: ' +
"${req.getResponseCode()}, ${req.getHeaderFields()}, ${resText}")
} else {
throw new Exception('Received a non-200 response from Github: ' +
'Maybe specify "-PgithubToken=<personalAccessToken>" option: ' +
"${req.getResponseCode()}, ${req.getHeaderFields()}, ${resText}")
}
}
def res = new JsonSlurper().parseText(resText)
res.each({
def username = it['login']
def avatarUrl = it['avatar_url']
if (!(username instanceof CharSequence) || !(avatarUrl instanceof CharSequence)) {
throw new Exception("Received an invalid response from Github: ${resText}")
}
contributors.put("${username}".toString(), "${avatarUrl}".toString())
})

// Handle pagination
def link = req.getHeaderField('Link')
if (link == null) {
// Last page or no link header
break
}

def nextLinkMatcher = nextPattern.matcher(link)
if (!nextLinkMatcher.find()) {
// No next link
break
}

// Jump to the next page
url = nextLinkMatcher.group(1)
}

contributorsFile.withPrintWriter('UTF-8') { out ->
out.println(new JsonBuilder(contributors).toPrettyString())
}
}
}

24 changes: 0 additions & 24 deletions site-new/docs/api-link-test.mdx

This file was deleted.

51 changes: 0 additions & 51 deletions site-new/docs/required-dependencies-test.mdx

This file was deleted.

Loading
Loading