Skip to content
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

feat(site): Migrated the website to use Antora. #1880

Merged
merged 12 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,5 @@ DartConfiguration.tcl
/plc4c/.idea/codeStyles/codeStyleConfig.xml
/plc4c/.idea/codeStyles/Project.xml
/plc4c/.idea/.name

/website/node_modules/
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pipeline {
// Generate the driver documentation.
sh './mvnw -P${JENKINS_PROFILE},with-java,skip-prerequisite-check site -X -pl :plc4j-driver-all'
// Build the actual website.
sh './mvnw -P${JENKINS_PROFILE},skip-prerequisite-check site -X -pl .'
sh './mvnw -P${JENKINS_PROFILE},skip-prerequisite-check site -X -pl . -pl website'
}
}

Expand All @@ -196,7 +196,7 @@ pipeline {
//sh './mvnw -B -P${JENKINS_PROFILE},skip-prerequisite-check,with-proxies site:stage'
sh './mvnw -B -P${JENKINS_PROFILE},skip-prerequisite-check site:stage -pl .'
// Make sure the script is executable.
sh 'chmod +x tools/clean-site.sh'
//sh 'chmod +x tools/clean-site.sh'
// Remove some redundant resources, which shouldn't be required.
//sh 'tools/clean-site.sh'
// Stash the generated site so we can publish it on the 'git-website' node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def plcDriverManager = new DefaultPlcDriverManager(moduleClassloader)

// Process all driver information.
for (final def protocolCode in plcDriverManager.getProtocolCodes()) {
def outputFile = new File(project.getBasedir(), "src/site/generated/" + protocolCode + ".adoc")
def outputFile = new File(project.getBasedir(), "../../../website/generated/" + protocolCode + ".adoc")
// In order to re-generate this file, make sure it doesn't exist.
if(outputFile.exists()) {
outputFile.delete()
Expand Down
95 changes: 8 additions & 87 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
<modules>
<!-- Definition of the protocol message formats -->
<module>protocols</module>
<module>website</module>
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -644,7 +645,7 @@
</goals>
<inherited>false</inherited>
<configuration>
<source>${project.basedir}/src/main/script/prerequisiteCheck.groovy</source>
<source>${project.basedir}/website/main/script/prerequisiteCheck.groovy</source>
</configuration>
</execution>
<!--
Expand All @@ -658,7 +659,7 @@
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/src/main/script/preSiteGeneration.groovy</source>
<source>${project.basedir}/website/main/script/preSiteGeneration.groovy</source>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -976,55 +977,6 @@

-->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-site-resources</id>
<!-- Only execute this for the parent module -->
<inherited>false</inherited>
<phase>pre-site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/site/resources-filtered</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/site</targetPath>
</resource>
</resources>
</configuration>
</execution>
<!--
Copy the schemas that might be distributed throughout the codebase to a central "schemas"
directory so IDEs can automatically pull them in.
-->
<execution>
<id>copy-schemas</id>
<!-- Only execute this for the parent module -->
<inherited>false</inherited>
<phase>pre-site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<resources>
<!-- Copy the resources for the test-suites -->
<resource>
<directory>${project.basedir}/plc4j/utils/test-utils/src/main/resources/schemas</directory>
<targetPath>${project.build.directory}/site/schemas</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<!--
Make the maven-site-plugin stage the output in the "asf-site" branch
-->
Expand Down Expand Up @@ -1266,48 +1218,17 @@
generating output.
-->
<version>3.12.1</version>

<configuration>
<!--templateFile>${session.executionRootDirectory}/src/site/template/site.vm</templateFile-->
<generateReports>false</generateReports>
<generateSitemap>true</generateSitemap>
<generateSitemap>false</generateSitemap>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
<locales>en</locales>
<inputEncoding>${project.build.sourceEncoding}</inputEncoding>
<outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
<!--
IntelliJ can't find the asciidoc config option in the site plugin, which is correct.
However, this config section is used by the asciidoctor site plugin extension. So please
ignore this error, it's actually ok.
-->
<asciidoc>
<attributes>
<source-highlighter>prettify</source-highlighter>
<imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
<pom-adoc>${project.build.directory}/pom.adoc</pom-adoc>
</attributes>
<requires>
<require>asciidoctor-diagram</require>
</requires>
</asciidoc>

</configuration>
<dependencies>
<!-- Add support for asciidoctor -->
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor.maven.plugin.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-diagram</artifactId>
<version>${asciidoctorj.diagram.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
Expand Down Expand Up @@ -1723,7 +1644,7 @@
Please don't change "target" to "${project.build.directory}" as profile-activation happens before
property resolution ... it won't work with a property.
-->
<exists>src/main/generated/</exists>
<exists>website/main/generated/</exists>
</file>
</activation>
<build>
Expand All @@ -1740,7 +1661,7 @@
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/generated/</source>
<source>${project.basedir}/website/main/generated/</source>
</sources>
</configuration>
</execution>
Expand Down
Loading
Loading