Skip to content

Commit

Permalink
add support for asciidoc partials (#2214)
Browse files Browse the repository at this point in the history
* add support for asciidoc partials

* store partials in same directory

* Update index.adoc
  • Loading branch information
gdams authored Sep 15, 2023
1 parent cc28401 commit 7c21d9f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 61 deletions.
59 changes: 59 additions & 0 deletions content/asciidoc-pages/support/_partials/support-table.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[width="100%",cols="5*",options="header",]
|===

| Java Version | First Availability | Latest Release | Next Release Due | End of Availability ^[1]^

| Java 21 (LTS)
| Expected +
Sep 2023
| Not available
| Expected +
Sep 2023
| Expected Sep 2029

| Java 20
| Mar 2023
| 20 Jul 2023 +
[.small]#jdk-20.0.2+9#
| EOSL^[2]^
| Expected Sep 2023

| Java 19
| Sep 2022
| 17 Jan 2023 +
[.small]#jdk-19.0.2+7#
| EOSL^[2]^
| Mar 2023

| Java 18
| Mar 2022
| 28 Aug 2022 +
[.small]#jdk-18.0.2.1+1#
| EOSL^[2]^
| Sep 2022

| Java 17 (LTS)
| Sep 2021
| 18 Jul 2023 +
[.small]#jdk-17.0.8+7#
| 17 Oct 2023 +
[.small]#jdk-17.0.9#
| At least Oct 2027

| Java 11 (LTS)
| Sep 2018
| 18 Jul 2023 +
[.small]#jdk-11.0.20+8#
| 17 Oct 2023 +
[.small]#jdk-11.0.21#
| At least Oct 2024

| Java 8 (LTS)
| Mar 2014
| 21 Jul 2023 +
[.small]#jdk8u382-b05#
| 17 Oct 2023 +
[.small]#jdk8u392#
| At least Nov 2026

|===
61 changes: 2 additions & 59 deletions content/asciidoc-pages/support/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= Temurin(TM) Support
:page-authors: gdams, karianna, sxa, tellison, SueChaplain, sxa555, mvitz, ParkerM, M-Davies, Malax, lasombra, practicalli-john, jeffalder, hendrikebbers, douph1, andrew-m-leonard, mr-david-owens, DanHeidinga, sophia-guo, zdtsw, adamfarley
:toc:
:partialDir: _partials

== Community Support

Expand Down Expand Up @@ -56,65 +57,7 @@ https://calendar.google.com/calendar/embed?src=c_56d7263c0ceda87a1678f6144426f23
of our releases. We always prioritise the most popular platforms which
will typically appear within a few days of these dates.

[width="100%",cols="5*",options="header",]
|===

| Java Version | First Availability | Latest Release | Next Release Due | End of Availability ^[1]^

| Java 21 (LTS)
| Expected +
Sep 2023
| Not available
| Expected +
Sep 2023
| Expected Sep 2029

| Java 20
| Mar 2023
| 20 Jul 2023 +
[.small]#jdk-20.0.2+9#
| EOSL^[2]^
| Expected Sep 2023

| Java 19
| Sep 2022
| 17 Jan 2023 +
[.small]#jdk-19.0.2+7#
| EOSL^[2]^
| Mar 2023

| Java 18
| Mar 2022
| 28 Aug 2022 +
[.small]#jdk-18.0.2.1+1#
| EOSL^[2]^
| Sep 2022

| Java 17 (LTS)
| Sep 2021
| 18 Jul 2023 +
[.small]#jdk-17.0.8+7#
| 17 Oct 2023 +
[.small]#jdk-17.0.9#
| At least Oct 2027

| Java 11 (LTS)
| Sep 2018
| 18 Jul 2023 +
[.small]#jdk-11.0.20+8#
| 17 Oct 2023 +
[.small]#jdk-11.0.21#
| At least Oct 2024

| Java 8 (LTS)
| Mar 2014
| 21 Jul 2023 +
[.small]#jdk8u382-b05#
| 17 Oct 2023 +
[.small]#jdk8u392#
| At least Nov 2026

|===
include::{partialDir}/support-table.adoc[]

^[1]^ As a general philosophy, Adoptium will continue to build binaries
for LTS releases as long as the corresponding upstream source is
Expand Down
9 changes: 7 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
options: {
name: 'asciidoc-pages',
path: path.join(__dirname, 'content/asciidoc-pages'),
ignore: ['**/*.md']
ignore: ['**/*.md', '**/_partials/**']
}
},
{
Expand Down Expand Up @@ -129,7 +129,12 @@ module.exports = {
]
}
},
'gatsby-transformer-asciidoc',
{
resolve: 'gatsby-transformer-asciidoc',
options: {
safe: 'server'
}
},
{
resolve: 'gatsby-plugin-mdx',
options: {
Expand Down
9 changes: 9 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ exports.onCreateNode = async ({ node, actions, getNode, getNodes }) => {
const fetchFilePath = getNodes().find(n => n.id === node.parent)
const name = path.basename(fetchFilePath.relativePath, '.adoc')

const currentFileDir = path.dirname(fetchFilePath.absolutePath)
const partialDir = path.join(currentFileDir, '_partials')

// Check if post.name is "index" -- because that's the file for default language
// (In this case "en")
const isDefault = name === 'index'
Expand Down Expand Up @@ -201,6 +204,12 @@ exports.onCreateNode = async ({ node, actions, getNode, getNodes }) => {
node,
value
})

createNodeField({
node,
name: 'partialDir',
value: partialDir
})
} else if (node.internal.type === 'Mdx') {
const slug = createFilePath({ node, getNode })
const date = new Date(node.frontmatter.date)
Expand Down

0 comments on commit 7c21d9f

Please sign in to comment.