#178 Sync stg with prod & Upgrade to antora 3.0
Merged 4 months ago by darknao. Opened 7 months ago by darknao.
fedora-docs/ darknao/docs-fp-o stg  into  stg

file modified
+2 -2
@@ -1,9 +1,9 @@ 

  FROM fedora:34

  

- RUN dnf -y module install nodejs:14 && \

+ RUN dnf -y module install nodejs:16 && \

      dnf clean all

  

- RUN npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3

+ RUN npm i -g @antora/cli@3.0.0 @antora/site-generator-default@3.0.0

  

  WORKDIR /antora

  ENTRYPOINT [ "antora" ]

file modified
+2 -2
@@ -1,10 +1,10 @@ 

  FROM fedora:34

  

- RUN dnf -y module install nodejs:14/default && \

+ RUN dnf -y module install nodejs:16/default && \

      dnf -y install git python3-yaml && \

      dnf clean all

  

- RUN npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3

+ RUN npm i -g @antora/cli@3.0.0 @antora/site-generator-default@3.0.0

  

  ADD rebuild-site.py /antora/rebuild-site.py

  

file modified
+1 -1
@@ -1,6 +1,6 @@ 

  #!/bin/sh

  

- image="docker.io/antora/antora"

+ image="docker.io/antora/antora:3.0.0"

  cmd="--html-url-extension-style=indexify site.yml"

  

  if [ "$(uname)" = "Darwin" ]; then

file modified
+19 -3
@@ -14,6 +14,7 @@ 

    - url: https://pagure.io/fedora-docs/release-docs-home.git

      branches:

      - master

+     - f35

      - f34

      - f33

      - f32
@@ -26,6 +27,7 @@ 

    - url: https://pagure.io/fedora-docs/install-guide.git

      branches:

      - master

+     - f35

      - f34

      - f33

      - f32
@@ -38,6 +40,7 @@ 

    - url: https://pagure.io/fedora-docs/system-administrators-guide.git

      branches:

      - master

+     - f35

      - f34

      - f33

      - f32
@@ -50,6 +53,7 @@ 

    - url: https://pagure.io/fedora-docs/release-notes.git

      branches:

      - master

+     - f35

      - f34

      - f33

      - f32
@@ -63,6 +67,10 @@ 

    - url: https://pagure.io/mentored-projects.git

    - url: https://pagure.io/fedora-commops.git

      start_path: docs

+     branches: main

+   - url: https://pagure.io/fedora-websites.git

+     start_path: docs

+     branches: main

    - url: https://pagure.io/Fedora-Council/council-docs.git

      start_path: council

      branches: main
@@ -72,6 +80,7 @@ 

    - url: https://pagure.io/Fedora-Council/status_reports.git

      branches: main

    - url: https://pagure.io/fedora-docs/modularity.git

+   - url: https://pagure.io/fedora-docs/package-maintainer-docs.git

    - url: https://github.com/fedora-silverblue/silverblue-docs.git

    - url: https://pagure.io/fedora-kde/kinoite-docs

      branches: main
@@ -102,7 +111,6 @@ 

      branches: main

    - url: https://pagure.io/cpe/rawhide-gating-docs.git

    - url: https://pagure.io/cpe/docs.git

-   - url: https://pagure.io/fedora-docs/websites.git

    - url: https://pagure.io/fedora-qa/qa-docs.git

    - url: https://pagure.io/fedora-pgm/pgm_docs.git

      branches: main
@@ -122,9 +130,17 @@ 

    - url: https://pagure.io/fedora-server.git

      branches: stg

      start_path: docs

+   - url: https://pagure.io/fedora-server.git

+     branches: stg

+     start_path: wg

+   - url: https://pagure.io/epel.git

+     branches: main

+   - url: https://pagure.io/infra-docs-fpo.git

+   - url: https://pagure.io/fedora-workstation/workstation-docs.git

+     branches: main

  ui:

    bundle:

-     url: https://asamalik.fedorapeople.org/docs-translations/ui-bundle.zip

+     url: https://releases.pagure.org/fedora-docs/fedora-docs-ui/ui-bundle-1.01.zip

      snapshot: true

    default_layout: with_menu

    supplemental_files: ./supplemental-ui
@@ -134,7 +150,7 @@ 

    destinations:

    - provider: archive

  runtime:

-   pull: true

+   fetch: true

    cache_dir: ./cache

  asciidoc:

    extensions:

empty or binary file added
@@ -0,0 +1,59 @@ 

+ <!DOCTYPE html>

+ <html lang="en">

+   <head>

+     <meta charset="utf-8">

+     <meta name="viewport" content="width=device-width, initial-scale=1.0">

+     <title>{{{detag (or page.title 'Untitled')}}}{{#if site.title}} :: {{site.title}}{{/if}}</title>

+     {{#if page.canonicalUrl}}

+     <link rel="canonical" href="{{page.canonicalUrl}}">

+     {{/if}}

+     {{#if page.description}}

+     <meta name="description" content="{{page.description}}">

+     {{/if}}

+     {{#if page.keywords}}

+     <meta name="keywords" content="{{page.keywords}}">

+     {{/if}}

+     {{#if (or antoraVersion site.antoraVersion)}}

+     <meta name="generator" content="Antora {{or antoraVersion site.antoraVersion}}">

+     {{/if}}

+     <link rel="stylesheet" href="{{uiRootPath}}/css/site.css">

+ {{> head}}

+   </head>

+   <body class="article">

+ {{> announcement}}

+ {{> header}}

+ <div class="toolbar" role="navigation" style="background-color:white">

+   <button class="navigation-toggle"></button>

+ <nav class="crumbs" role="navigation" aria-label="breadcrumbs"></nav>

+ {{> page-languages}}

+ {{> page-versions}}

+   {{#if page.editUrl}}

+   <div class="edit-this-page"><a href="{{page.editUrl}}">Edit this Page</a></div>

+   {{/if}}

+ </div>

+ 

+ 

+ <div class="main-wrapper">

+   <main class="main" role="main">

+ 

+ <article class="doc" style="margin: 0; max-width: 100%;">

+ {{#if (eq page.layout '404')}}

+ <div class="paragraph">

+ <p>The page you're looking for does not exist. It may have been moved.</p>

+ </div>

+ <div class="paragraph">

+ <p>If you arrived on this page by clicking on a link, please notify the owner of the site that the link is broken.

+ If you typed the URL of this page manually, please double check that you entered the address correctly.</p>

+ </div>

+ {{else}}

+ 

+ {{{page.contents}}}

+ {{/if}}

+ </article>

+   </main>

+ </div>

+ 

+ 

+ {{> footer}}

+   </body>

+ </html>

@@ -0,0 +1,28 @@ 

+ <!DOCTYPE html>

+ <html lang="en">

+   <head>

+     <meta charset="utf-8">

+     <meta name="viewport" content="width=device-width, initial-scale=1.0">

+     <title>{{{detag (or page.title 'Untitled')}}}{{#if site.title}} :: {{site.title}}{{/if}}</title>

+     {{#if page.canonicalUrl}}

+     <link rel="canonical" href="{{page.canonicalUrl}}">

+     {{/if}}

+     {{#if page.description}}

+     <meta name="description" content="{{page.description}}">

+     {{/if}}

+     {{#if page.keywords}}

+     <meta name="keywords" content="{{page.keywords}}">

+     {{/if}}

+     {{#if (or antoraVersion site.antoraVersion)}}

+     <meta name="generator" content="Antora {{or antoraVersion site.antoraVersion}}">

+     {{/if}}

+     <link rel="stylesheet" href="{{uiRootPath}}/css/site.css">

+ {{> head}}

+   </head>

+   <body class="article">

+ {{> announcement}}

+ {{> header}}

+ {{> main}}

+ {{> footer}}

+   </body>

+ </html>

@@ -0,0 +1,35 @@ 

+ <!DOCTYPE html>

+ <html lang="en">

+   <head>

+     <meta charset="utf-8">

+     <meta name="viewport" content="width=device-width, initial-scale=1.0">

+     <title>{{{detag (or page.title 'Untitled')}}}{{#if site.title}} :: {{site.title}}{{/if}}</title>

+     {{#if page.canonicalUrl}}

+     <link rel="canonical" href="{{page.canonicalUrl}}">

+     {{/if}}

+     {{#if page.description}}

+     <meta name="description" content="{{page.description}}">

+     {{/if}}

+     {{#if page.keywords}}

+     <meta name="keywords" content="{{page.keywords}}">

+     {{/if}}

+     {{#if (or antoraVersion site.antoraVersion)}}

+     <meta name="generator" content="Antora {{or antoraVersion site.antoraVersion}}">

+     {{/if}}

+     <link rel="stylesheet" href="{{uiRootPath}}/css/site.css">

+ {{> head}}

+   </head>

+   <body class="article">

+ {{> announcement}}

+ {{> header}}

+ <div class="main-wrapper">

+ 

+   <main class="main" role="main">

+ {{> toolbar}}

+ {{> article}}

+   </main>

+ </div>

+ 

+ {{> footer}}

+   </body>

+ </html>

@@ -0,0 +1,1 @@ 

+ <!-- Add any HTML code to show at the top of each page — like a banner to a survey, some announcement, etc. Leave this file empty to not show anything-->

@@ -0,0 +1,4 @@ 

+ <footer class="footer">

+   <p>All Fedora Documentation content available under <a href="http://creativecommons.org/licenses/by-sa/4.0/legalcode">CC BY-SA 4.0</a> or, when specifically noted, under another <a href="https://fedoraproject.org/wiki/Licensing:Main">accepted</a> free and open content license.</p>

+   <p>Last build: {{{env.ANTORA_DATE}}}</p>

+ </footer>

Keeps staging up to date with prod

@pbokoc Any thoughts on this? I generally haven't touched the staging site.

rebased onto ef1b007

4 months ago

Added upgrade to antora 3.0.0

Does this mean that we will have to prepare the PR with fixes for all docs pages first, then merge this PR and the other PRs shortly after for everyone?

I'm not sure to understand what other fixes you are talking about.
So far, I've not seen any required fixes needed on other sub repositories, but I may have missed them as I've not reviewed everything. That's why I'm targeting a deployment on staging first, so we can see if anything needs to be fixed before going to prod.
Are you referring to a local site.yml you can find on each sub repos ?
If that is the case, this one is only used for independent local build of docs module, and is not used by the global documentation build used here.
You indeed still need to fix that file if needed, but it will not affect the build of docs.fp-o.

As far as I have tested, the changes appear to be fully compatible between 2 and 3 so we can update all docs right now to the new config and then merge this one. I'll start with Fedora CoreOS, Silverblue, Kinoite.

@darknao Is the antora.yml file used to generate the official docs? If yes, I think we should update it for all docs repos before we merge this one. Otherwise we can go ahead.

Yes, it is.
I think the only parameter that may be impacted by this migration is the start_page one.
By default, antora will use the index.adoc from the main (ROOT) module, unless you set it to something else and the page actually exist in the tree.
So something like start_page: ROOT:index will throw a warning during the build, and default back to index.adoc.
In this very specific case, the end result will remain the same, but if you have something like start_page: ROOT:start, it will most likely end up with a 404 if you only have a start.adoc page instead of index.adoc.

In any cases, I think it's a good idea to clean up all repos to use the correct name+extension for this setting, if it isn't already set correctly.

2 new commits added

  • Update ui-bundle to 1.01
  • Use fixed antora version for local build
4 months ago

We are all set for testing antora 3.0 on the staging environment.
I'm merging this.
docs.stg.fedoraproject.org should pick up the changes in a few hours, so we should be able to see if anything breaks.
I'll give it a few days/weeks then make another PR for production deployment.

Pull-Request has been merged by darknao

4 months ago