Skip to content

Commit

Permalink
Work on reducing download size of manual
Browse files Browse the repository at this point in the history
  • Loading branch information
jodygarnett committed Sep 15, 2023
1 parent 291a344 commit fe6e5f4
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 2 deletions.
25 changes: 25 additions & 0 deletions docs/manual/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ Reference:

The [project issue tracker](https://github.com/geonetwork/core-geonetwork/issues) is used for communication, with ongoing topics tagged [documentation](https://github.com/geonetwork/core-geonetwork/issues?q=is%3Aissue+label%3Adocumenation).


## Maven Integration

1. Build documentation with ``compile`` phase:
```
mvn compile
```

2. Assemble ``zip`` with ``package`` phase:
```bash
mvn compile
```

3. Both ``install`` and ``deploy`` are skipped (so ``mvn clean install`` is fine).

4. Use profile to include specific language:
```
mvn install -Pfrench
```

Or flag for all of them:
```
mvn install -Dall
```

## Material for MkDocs

Documentation is [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) which is a Markdown documentation framework written on top of [MkDocs](https://www.mkdocs.org/).
Expand Down
3 changes: 1 addition & 2 deletions docs/manual/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ theme:

plugins:
- search
- offline
- i18n:
docs_structure: suffix
languages:
Expand All @@ -51,7 +50,7 @@ plugins:
site_name: 'GeoNetwork (en)'
- locale: fr
name: Français
build: true
build: !ENV [FRENCH,false]
site_name: 'GeoNetwork (fr)'
nav_translations:
Home: Home
Expand Down
5 changes: 5 additions & 0 deletions docs/manual/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "base.html" %}

{% block announce %}
Preview GeoNetwork documentation in mkdocs, feedback welcome on <a href="https://github.com/geonetwork/core-geonetwork/issues/7286">core-geonetwork#7286</a>
{% endblock %}
19 changes: 19 additions & 0 deletions docs/manual/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<artifactId>gn-guide</artifactId>
<name>GeoNetwork Guide</name>
<packaging>pom</packaging>
<properties>
<french>false</french>
</properties>
<licenses>
<license>
<name>Creative Commons Attribution 3.0 License</name>
Expand All @@ -55,7 +58,9 @@
<configuration>
<target>
<exec executable="mkdocs" failonerror="true" dir="${basedir}">
<env key="FRENCH" value="${french}"/>
<arg line="build"/>
<arg line="--no-directory-urls"/>
</exec>
</target>
</configuration>
Expand Down Expand Up @@ -98,4 +103,18 @@
</plugins>
</build>

<profiles>
<profile>
<id>french</id>
<activation>
<property>
<name>all</name>
</property>
</activation>
<properties>
<french>true</french>
</properties>
</profile>
</profiles>

</project>
7 changes: 7 additions & 0 deletions docs/manual/src/assembly/guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
<fileSets>
<fileSet>
<directory>target/html</directory>
<outputDirectory></outputDirectory>
<excludes>
<exclude>**/*.rst</exclude>
<exclude>confy.py</exclude>
<exclude>anchors.txt</exclude>
<exclude>404.html</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

0 comments on commit fe6e5f4

Please sign in to comment.