Skip to content
Snippets Groups Projects
  1. Oct 19, 2020
    • Martyn Welch's avatar
      Update links broken by move to ref shortcode · cd14862c
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      There are 2 internationalisation documents, we need to detail which one we
      mean in the link that uses it.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      cd14862c
    • Martyn Welch's avatar
      Tweak old links to old sites · 96826db7
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      The developer documentation contains URLs to designs.a.o and the old wiki.
      The website contains links to the developer site. Now that these are all
      on the same site, update links to internal links.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      96826db7
    • Martyn Welch's avatar
      Patch up links to missing App store page · 597af7c0
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      The developer document contains links to an `app-distribution.md` document
      that doesn't exist. Point to the legacy canterbury documentation for now.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      597af7c0
    • Martyn Welch's avatar
      Update internal links to use "ref" shortcode" · 749945ba
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      Hugo provides a short code that allows us to perform some checks on links
      at build time. Use it.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      749945ba
    • Martyn Welch's avatar
      Clean up developer index · 056173c6
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      A quick first pass to clean up the developer index page.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      056173c6
    • Martyn Welch's avatar
      Tweak path to multimedia.md due to naming clash · 156f2465
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      Both the developer and designs documentation contain a file named
      "multimedia.md`. Tweak the path used in the documentation to remove the
      ambiguity.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      156f2465
    • Martyn Welch's avatar
      Move developer images to correct folder · 02faa07f
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      Following the tweaks to the pages the images need to be moved to their new
      expected location under images.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      02faa07f
    • Martyn Welch's avatar
      Move developer index.md to _index.md · e156cd2c
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      The developer documentation is now in it's own temporary section. Move the
      index page to the correct name for a section index.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      e156cd2c
    • Martyn Welch's avatar
      Convert HotDoc formatting for Hugo · 3bb17562
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      The existing metadata and some inline codes need converting to work with
      Hugo:
      
       - Remove authors as we don't have an equivalent for that in Hugo
       - Add in fields that the existing metadata doesn't have
       - Include aliases to allow us to point to the new pages from a
         redirect on designs.apertis.org
       - Ensure we have a title (based on filename if one not present)
       - Convert hotdoc code blocks to Hugo equivalent
       - HotDoc allowed a `[][link]` format that Hugo doesn't understand
       - HotDoc allowed relative links without text, which Hugo doesn't handle
       - The location of the images and other media has changed
       - The format used for internal page references has is different
      
      Additionally, fix up touched links to other Apertis pages to use the
      Hugo "ref" shortcode, which reduces the risk of leaving hanging links.
      
      All frontmatter created in toml format to stay consistent with existing
      documents.
      
      Converted using the following python script:
      ```
      
      import os
      import re
      import subprocess
      import sys
      import toml
      import yaml
      
      def url_munge(match):
          url = match.group('url').strip('.')
          if url[0] != "/":
              url = "/%s" % url
          url = url.replace("media", "images")
          link = ("![](%s)" % url)
      
          return link
      
      def link_munge(match):
          link = match.group('link')
          new = link.replace("(", "")
          new = new.replace(")", "")
          new = new.replace("`", "")
          new = new.replace("?", "")
          new = new.replace(":", "")
          new = new.replace(",", "")
          new = new.replace("–", "")
          new = new.replace("“", "")
          new = new.replace("”", "")
          new = new.replace(".", "")
          new = new.replace(" ", "-")
          new = new.lower()
          new = (" [%s]( {{< ref \"#%s\" >}} )" % (link, new))
      
          return new
      
      def link_munge_2(match):
          link = match.group('link')
          new = link.replace("#", "")
          new = new.replace("-", " ")
          new = new.replace(".md", "")
          if not "http" in link:
              link = " {{< ref \"%s\" >}} " % link
      
          new = (" [%s](%s)" % (new, link))
      
          return new
      
      for filename in os.listdir("."):
          if ".md" not in filename:
              continue
      
          print("%s: " % filename)
          with open(filename, 'r+') as file:
              contents = file.read()
              if contents[0:3] == "+++":
                  # We have toml
                  data = toml.loads(contents.split("+++")[1])
                  doc = "+++".join(contents.split("+++")[2:])
              elif contents[0:3] == "---":
                  # We have yaml
                  data = yaml.load(contents.split("---")[1])
                  doc = "---".join(contents.split("---")[2:])
              else:
                  # No frontmatter
                  data = {}
                  doc = contents
      
              if not "title" in data.keys():
                  data["title"] = filename.split(".")[0].replace('_', ' ').capitalize()
      
              data["weight"] = 100
              data["aliases"] = ["/old-developer/latest/%s" % filename.replace(".md", ".html")]
      
              # Add aliases
              latest = data['aliases'][0]
      
              for version in ['v2019', 'v2020', 'v2021pre', 'v2022dev0']:
                  versioned = latest.replace("/latest/", "/%s/" % version)
                  data['aliases'].append(versioned)
      
              data["outputs"] = ["html", "pdf-in"]
      
              # Remove authors
              if "authors" in data.keys():
                  del data["authors"]
      
              # Switch HotDoc code blocks to hugo code blocks
              pattern = re.compile("^---", re.MULTILINE)
              doc = pattern.sub("```", doc)
      
              # Hotdoc uses `[][Internal Title]` for internal links whilst Hugo uses `[](#internal-title)`
              pattern = re.compile("\[\]\[(?P<link>.*?)\]")
              doc = pattern.sub(link_munge, doc)
      
              # Hotdoc allows empty links like `[](url)`
              pattern = re.compile("[^!]\[\]\((?P<link>.*?)\)")
              doc = pattern.sub(link_munge_2, doc)
      
              # Media links not working
              pattern = re.compile("!\[\]\((?P<url>.*?)\)")
              doc = pattern.sub(url_munge, doc)
      
              file.seek(0)
              file.truncate()
      
              file.write("+++\n")
              file.write(toml.dumps(data))
              file.write("+++")
              file.write(doc)
      ```
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      3bb17562
    • Martyn Welch's avatar
      Change front matter trailing marker for Hugo · 453977a1
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      The documentation pulled from developer.apertis.org, which utilises HotDoc
      document generation uses a `...` marker at the end of it's leading
      metadata whilst Hugo (as used on the website) expects `---`. change
      instances of this string.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      453977a1
    • Martyn Welch's avatar
      Add documents from developer.apertis.org · 286d5488
      Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
      
      This is the initial import of documents and media from
      developer.apertis.org. It will need tweaks to make it build properly.
      
      Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
      286d5488
  2. Oct 15, 2020
  3. Oct 13, 2020
  4. Oct 12, 2020
  5. Oct 11, 2020
  6. Oct 05, 2020
    • Emanuele Aina's avatar
      gitlab-ci: Reduce cost and latency of jobs · 9892fdf0
      Emanuele Aina authored
      
      Add the `lightweight` tag to run jobs on the GitLab runners set up for
      jobs that do not need large amounts of resources (max 2GB of RAM) and do
      not need privileged containers.
      
      The former makes jobs cheaper because they user smaller VM instance
      types, the latter improves latency as there's no strong need to spin
      separate VMs to keep each job isolated and existing instances can be
      re-used instead.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      9892fdf0
  7. Oct 02, 2020
  8. Oct 01, 2020
  9. Sep 30, 2020
  10. Sep 28, 2020
  11. Sep 25, 2020
  12. Sep 24, 2020
  13. Sep 23, 2020
    • Emanuele Aina's avatar
      image-build-infrastructure: Mark as obsolete · e39cd6e1
      Emanuele Aina authored and Martyn Welch's avatar Martyn Welch committed
      
      This document describes how we built images on Jenkins, but we have now
      largely moved away from it in favor of GitLab CI/CD.
      
      The README in the infrastructure/apertis-image-recipes> project
      describes the current setup closer to the actual code.
      
      Keep the document around since v2019 and v2020 are still officially on
      Jenkins and old release notes still point here.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      e39cd6e1
    • Emanuele Aina's avatar
      jenkins-docker: Drop obsolete document · 86266744
      Emanuele Aina authored and Martyn Welch's avatar Martyn Welch committed
      
      Now that we have largely moved away from Jenkins to GitLab CI/CD the
      document describing the benefits of using Docker with Jenkins no longer
      add much value.
      
      The switch to Docker has proved immensely useful and has been a
      fundamental piece for our ability to move to GitLab CI/CD, and in 2020
      Docker is widespread enough in the industry that there's no longer a
      real need for Apertis to rehash the benefits it brings.
      
      Let's drop the document now that it has been fully implemented and
      that we moved the CI/CD architecture even further, making the
      document obsolete.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      86266744
Loading