Class PublishDocs

java.lang.Object
ai.redouble.docs.PublishDocs

public class PublishDocs extends Object
Puts the generated site into a checkout of the documentation repository as one version of the published documentation. The repository holds every published version, already generated, one directory each under site/nucleo; what it holds is what the documentation host serves. Publishing a version that is not there adds it; publishing one that is there replaces its directory whole, so no page of the earlier publication survives. Then what depends on the set of versions is written again from the directories themselves: site/nucleo/versions.json, the versions newest first, which every page's version badge reads; site/_redirects, which sends the address without a version to the newest one; and site/robots.txt, which has search engines index the newest version alone. The page the host shows for an address that leads nowhere, site/404.html, is written with them, and the repository's own LICENSE and NOTICE are taken from the newest version. Nothing here commits or pushes. The checkout is left changed for a person to review, commit and push, and the push is the publication.
Since:
0.1 (2026-10-01)
Author:
Andrey Santrosyan
  • Constructor Details

    • PublishDocs

      public PublishDocs()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Arguments: the directory of the generated site, the checkout of the documentation repository, the version.
      Throws:
      IOException
    • publish

      public static void publish(Path site, Path repository, String version) throws IOException
      Publishes the site under site as version into the checkout at repository.
      Throws:
      IOException