Skip to content

Migrate 2.x website to Antora #2427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 77 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4b8a031
Adapt the most recent docgen changes
vy Feb 29, 2024
6212882
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen
vy Mar 1, 2024
150b5bb
Adapt most recent `log4j-docgen` changes
vy Mar 6, 2024
f34fbb7
removed team list (replaced by logging.a.o)
grobmeier Mar 10, 2024
85f21d7
added file encoding for building the site on windows
grobmeier Mar 10, 2024
e148062
reconfigured site plugin so it is using asciidoc
grobmeier Mar 10, 2024
dbf3c27
added doctype template
grobmeier Mar 10, 2024
3fffee8
added new webfonts
grobmeier Mar 10, 2024
4f2b06f
removed obsolete logos
grobmeier Mar 10, 2024
6e1b9d1
removed unused glyphicons
grobmeier Mar 10, 2024
87be5a9
added font awesome
grobmeier Mar 10, 2024
9876702
replaced css
grobmeier Mar 10, 2024
0510da2
added transparent logo version
grobmeier Mar 10, 2024
e093794
removed obsolete javastyle page (enforced by tooling)
grobmeier Mar 10, 2024
4ce544a
migrated from markdown to adoc (not fully tested yet)
grobmeier Mar 10, 2024
ad39ff3
transformed appenders to asciidoc, incl sync to 3x version
grobmeier Mar 11, 2024
874418d
migrated architecture to asciidoc
grobmeier Mar 11, 2024
87aab22
converted async
grobmeier Mar 11, 2024
e904a46
transformed config docs to asciidoc, syncing with 3x
grobmeier Mar 11, 2024
9f6a942
added configuration docs
grobmeier Mar 11, 2024
0d9297e
migrated xml documentation to asciidoc
grobmeier Mar 11, 2024
f8a8293
improved some links
grobmeier Mar 11, 2024
ef3f28b
Bring back files reverted by mistake
vy Mar 11, 2024
d9b84fa
Merge remote-tracking branch 'origin/ms12_restructure_website_2x' int…
vy Mar 12, 2024
a2e1519
Fix `docgen.log4j.version` to `revision`
vy Mar 12, 2024
a927d61
The first working code with phased descriptors folder
vy Mar 13, 2024
79154c9
Switch from downloading descriptors to outputting them to the root
vy Mar 13, 2024
59aa802
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen
vy Mar 13, 2024
3340d02
Delete redundant `site.xml`
vy Mar 14, 2024
5565964
Improve plugin reference pages
vy Mar 14, 2024
f17f26d
Fix broken plugin manual link
vy Mar 15, 2024
e5104f2
Update auto-generated files
vy Mar 15, 2024
a491ebe
Fix `log4j-layout-template-json-test` POM
vy Mar 15, 2024
fcc53b9
Create a common `log4j.docgen.typeFilter.excludePattern` property
vy Mar 15, 2024
a9e6259
Remove incidentally committed `<dependency>`
vy Mar 15, 2024
b9c5a34
Don't place XSD to the website
vy Mar 19, 2024
00fb764
Provide schema version to docgen
vy Mar 19, 2024
8dd9c6c
Remove references to the old XSD
vy Mar 19, 2024
068e39e
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen
vy Mar 19, 2024
d7e6efe
Switch to the standard Maven Javadoc Plugin properties
vy Mar 19, 2024
c9e1f61
Correct `pom.xml` docs
vy Mar 19, 2024
46e5210
More `pom.xml` fine tuning
vy Mar 19, 2024
9838e13
Migrate from `generated-sources/site` to `generated-site`
vy Mar 21, 2024
d229a0c
Initial Antora migration
vy Mar 22, 2024
80b69c5
Fix `support.adoc` formatting
vy Mar 22, 2024
44c99bb
Antora fixes
vy Mar 22, 2024
b9bd47c
Update the `log4j-docgen.version`
vy Mar 22, 2024
38a292a
Improve `faq.adoc` formatting
vy Mar 26, 2024
18422e6
More Antora-related tweaking
vy Mar 26, 2024
8fa4d74
Improve Antora styling
vy Mar 26, 2024
334f541
Fix Antora images
vy Mar 27, 2024
0a0cb35
Fix links
vy Mar 27, 2024
6ee2b59
Simplify design and remove unused files
vy Mar 27, 2024
bb36189
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen-antora
vy Mar 27, 2024
dea284b
Implement `apiref` macro in JavaScript
vy Mar 28, 2024
70622a4
Antora UI fine-tuning
vy Mar 28, 2024
5928807
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen-antora
vy Mar 28, 2024
08e2bd9
More link fixes
vy Mar 28, 2024
d16bdcf
Fix Spotless issues
vy Mar 28, 2024
8e5b93f
Improve Antora footer on trademarks
vy Mar 29, 2024
5f6af7d
Add `tabs` support
vy Mar 29, 2024
4c3184c
Improve navigation
vy Mar 29, 2024
659cbaa
Update docs to reflect that no static file server is needed anymore
vy Mar 29, 2024
c32066a
Correct injected Log4j artifact version properties
vy Mar 29, 2024
0f4bdae
./mvnw spotless:apply
FreeAndNil Mar 30, 2024
9a7b3a6
Fix Antora invocation for Windows
vy Apr 1, 2024
259a0e2
Fix image links
vy Apr 1, 2024
da8b1bc
More doc fixes
vy Apr 2, 2024
20627b1
Remove deprecated files
vy Apr 2, 2024
837a721
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen-antora
vy Apr 2, 2024
a8aa2c0
Add changelog entry
vy Apr 2, 2024
391e4ce
Fix links in `javadoc.adoc`
vy Apr 3, 2024
234ac80
Improve AsciiDoc source code blocks
vy Apr 3, 2024
205f617
Improve navigation
vy Apr 3, 2024
4701171
Replace the default highlight.js color for strings from red to green
vy Apr 3, 2024
f14a8d5
Add icons
vy Apr 3, 2024
8b1776c
Merge remote-tracking branch 'origin/2.x' into 2.x-docgen-antora
vy Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ velocity.log
felix-cache/
/.metadata/
.DS_Store
node
node_modules
package-lock.json
7 changes: 1 addition & 6 deletions BUILDING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ You can build the website and manual as follows:
./mvnw site
----

And view it using a simple HTTP server, e.g., the one comes with the Python:

[source,bash]
----
python3 -m http.server -d target/site
----
You can view the generated website with a browser by pointing it to `target/site` directory.

[#development]
== Development
Expand Down
124 changes: 124 additions & 0 deletions antora-playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

site:
title: Apache Log4j
url: "https://logging.apache.org/log4j/2.x"
start_page: "ROOT::index.adoc"

content:
sources:
- url: .
branches: HEAD
start_paths:
- target/generated-site/antora
edit_url:

asciidoc:
attributes:
# JSON Template Layout manual page has a deep sectioning, support it.
# The trailing `@` is added so the attribute can still can be overridden in the header of a page.
# For instance, we override this value in release notes page.
page-toclevels: "4@"
log4j-docgen-descriptor-directory: target/plugin-descriptors
log4j-docgen-type-filter-exclude-pattern: ^java\..+
log4j-docgen-type-target-template: |
#{{{replaceAll sourcedType.groupId "." "-"}}}_{{{replaceAll sourcedType.artifactId "." "-"}}}_{{{replaceAll sourcedType.type.className "." "-"}}}
extensions:
- "@asciidoctor/tabs"
- src/docgen/apiref-macro.js

ui:

bundle:
url: "https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable"
snapshot: true

# Template files: https://github.com/asciidoctor/asciidoctor-docs-ui/blob/main/src
# Template variables: https://docs.antora.org/antora-ui-default/templates
supplemental_files:

# Add `@asciidoctor/tabs` extension styles
- path: css/vendor/tabs.css
contents: ./node_modules/@asciidoctor/tabs/dist/css/tabs.css

# Add `@asciidoctor/tabs` extension scripts
- path: js/vendor/tabs.js
contents: ./node_modules/@asciidoctor/tabs/dist/js/tabs.js

- path: partials/footer-scripts.hbs
contents: |
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
<!-- `@asciidoctor/tabs` extension scripts -->
<script async src="{{{uiRootPath}}}/js/vendor/tabs.js"></script>
{{#if env.SITE_SEARCH_PROVIDER}}
{{> search-scripts}}
{{/if}}

- path: partials/head-styles.hbs
contents: |
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css">
<link rel="icon" href="{{{uiRootPath}}}/../_images/favicon.ico" type="image/x-icon">
<!-- `@asciidoctor/tabs` extension styles -->
<link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">
<style>
/* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
.toc .toc-menu li[data-level="4"] a {
padding-left: 2.75rem
}
/* Replace the default highlight.js color for strings from red to green: */
.hljs-string {
color: #0f8532;
}
</style>

- path: partials/header-content.hbs
contents: |
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
<div class="navbar-item">
<img src="{{{uiRootPath}}}/../_images/logo-small-white.png" alt="Apache Log4j"/>
</div>
</div>
</nav>
</header>

- path: partials/footer-content.hbs
contents: |
<footer class="footer">
<p>
Copyright © 1999-{{{year}}} <a href="https://www.apache.org/">The Apache Software Foundation</a>.
Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.
Please read our <a href="https://privacy.apache.org/policies/privacy-policy-public.html">privacy policy</a>.
</p>
<p>
Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
</p>
</footer>

# Disable component version selector
- path: partials/nav-explore.hbs
contents: ""

# Fix the `Edit this page` link
- path: partials/edit-this-page.hbs
contents: |
<div class="edit-this-page"><a href="https://github.com/apache/logging-log4j2/edit/2.x/src/site/antora/modules/{{page.module}}/pages/{{page.relativeSrcPath}}">Edit this Page</a></div>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
* On invalid length the default value 100 is used (and an error message is logged).
* If max length is greater than 20, an abbreviated text will get ellipsis ("...") appended.
* Example usage (for email subject):
* {@code "%maxLen{[AppName, ${hostName}, ${web:contextPath}] %p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}"}
* <pre>{@code
* %maxLen{[AppName, ${hostName}, ${web:contextPath}] %p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}
* }</pre>
*
* @author Thies Wellpott
*/
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"@antora/cli": "^3.2.0-alpha.4",
"@antora/site-generator-default": "^3.2.0-alpha.4",
"@asciidoctor/tabs": "^1.0.0-beta.6",
"fast-xml-parser": "^4.3.6",
"handlebars": "^4.7.8"
}
}
Loading