Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-124

Create Groovy script to generated required YAML side car files (meta-data) for content, and strip content from old site files

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Workaround
    • None
    • None
    • website
    • None

    Description

      The new NetBeans statically generated website being developed at https://github.com/wadechandler/netbeans-static-site uses JBake and Gradle to build the site. It uses certain YAML files as "sidecar" files to the content files which explain to a template the type of file it is along with other meta-data, such as the document title etc. The new site uses Groovy templates to allow for common headers, footers, and side bars.

      These sidecar files, along with the main body content, allow for templates to be matched to the content type of a file, and then for that file to have everything it requires embedded inside of it to be served as a "static" web site with no server side component dynamically binding the information at runtime. This is a requirement of Apache projects web sites; to be static.

      The Groovy script described in this issue will:

      • Pull information such as the title, keywords, description, and other meta-data which may be embedded in HTML or other file types, and place that into the required sidecar YAML files of the build system
      • Pull out the main body content from the the original HTML file and place it into a file of the same name to match the YAML sidecar file per the new site naming conventions (see the README.md file)
      • Choose a template type for the content based on its file system hierarchy which seems representative of the way current NetBeans website is laid out; notice depending on the drill down into the web site, that certain side bars, headers, etc differ or are enabled or disabled. The new site does this based on the page/template type

      This Groovy script is a development time tool which is used to transform the old content into the format now needed. Once the conversion is done, then it should no longer be needed. It will be able to be run from the Gradle build like other aspects of the new sites build system; see buildSrc which is a good place for this Groovy script to be placed as a Groovy class.

      Attachments

        Issue Links

          Activity

            People

              wadechandler Wade Chandler
              wadechandler Wade Chandler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: