redhat-documentation / newdoc

Licence: GPL-3.0 license
The newdoc tool generates files formatted with AsciiDoc, which are used in Red Hat documentation.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to newdoc

live-documenter
.NET documentation generator and live reader. Generate documentation from .NET code and xml comments, fast, quick and easy.
Stars: ✭ 64 (+357.14%)
Mutual labels:  documentation-tool, documentation-generator
ocular
A documentation generator for our OSS frameworks
Stars: ✭ 42 (+200%)
Mutual labels:  documentation-tool, documentation-generator
Nbdev template
Template for nbdev projects
Stars: ✭ 161 (+1050%)
Mutual labels:  documentation-tool, documentation-generator
Naturaldocs
Natural Docs source code documentation system
Stars: ✭ 106 (+657.14%)
Mutual labels:  documentation-tool, documentation-generator
BooGi
Generate GitBook-like modern docs/tutorial websites using Gatsby
Stars: ✭ 117 (+735.71%)
Mutual labels:  documentation-tool, documentation-generator
Documentalist
📝 A sort-of-static site generator optimized for living documentation of software projects
Stars: ✭ 130 (+828.57%)
Mutual labels:  documentation-tool, documentation-generator
Dart
DART is a test documentation tool created by the Lockheed Martin Red Team to document and report on penetration tests, especially in isolated network environments.
Stars: ✭ 207 (+1378.57%)
Mutual labels:  documentation-tool, documentation-generator
Jsdoc To Markdown
Generate markdown documentation from jsdoc-annotated javascript
Stars: ✭ 1,199 (+8464.29%)
Mutual labels:  documentation-tool, documentation-generator
strictdoc
Software for writing technical requirements specifications.
Stars: ✭ 80 (+471.43%)
Mutual labels:  documentation-tool, documentation-generator
Nbdev
Create delightful python projects using Jupyter Notebooks
Stars: ✭ 3,061 (+21764.29%)
Mutual labels:  documentation-tool, documentation-generator
Dox
Haxe documentation generator.
Stars: ✭ 98 (+600%)
Mutual labels:  documentation-tool, documentation-generator
NextBook
NextBook is quick and easy way to build technical books or documentation with markdown that run blazingly fast.
Stars: ✭ 153 (+992.86%)
Mutual labels:  documentation-tool, documentation-generator
Drf Autodocs
Ultimately automated DRF documentation rendering(UNMAINTAINED)
Stars: ✭ 82 (+485.71%)
Mutual labels:  documentation-tool, documentation-generator
cutedoc
Generate stunning documentation for any project using simple markdown files.
Stars: ✭ 16 (+14.29%)
Mutual labels:  documentation-tool, documentation-generator
Graphdoc
Static page generator for documenting GraphQL Schema
Stars: ✭ 1,218 (+8600%)
Mutual labels:  documentation-tool, documentation-generator
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+113721.43%)
Mutual labels:  documentation-tool, documentation-generator
App
Fast and searchable Ruby docs
Stars: ✭ 47 (+235.71%)
Mutual labels:  documentation-tool, documentation-generator
Toast Ui.doc
Stars: ✭ 71 (+407.14%)
Mutual labels:  documentation-tool, documentation-generator
Ford
Automatically generates FORtran Documentation from comments within the code.
Stars: ✭ 245 (+1650%)
Mutual labels:  documentation-tool, documentation-generator
numpydoc.el
Insert NumPy style docstrings in Python functions.
Stars: ✭ 33 (+135.71%)
Mutual labels:  documentation-tool, documentation-generator

The newdoc tool

Crates.io Crates.io Crates.io

Copr build

The newdoc tool generates pre-populated module and assembly files formatted with AsciiDoc, which are used in Red Hat and Fedora documentation. The generated files follow the Modular Documentation guidelines: https://redhat-documentation.github.io/modular-docs/.

Installing newdoc

  • To install newdoc on current Fedora, RHEL 8 or later, or CentOS 8 or later, enable the Copr package repository:

    1. Enable the repository:

      # dnf copr enable mareksu/newdoc-rs
      
    2. Install newdoc:

      # dnf install newdoc
      

      The Copr repository distributes packages only for supported releases of Fedora. If you have enabled the repository but the package fails to install, check if your Fedora is still supported.

  • To install newdoc on openSUSE:

    1. Enable the Copr package repository:

      • On openSUSE Leap 15.3:

        # zypper addrepo \
          'https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/repo/opensuse-leap-15.3/mareksu-newdoc-rs-opensuse-leap-15.3.repo'
        
      • On openSUSE Tumbleweed:

        # zypper addrepo \
          'https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/repo/opensuse-tumbleweed/mareksu-newdoc-rs-opensuse-tumbleweed.repo'
        
    2. Install newdoc:

      # zypper refresh
      # zypper install --allow-vendor-change newdoc
      
  • To install newdoc from source on a Linux distribution, on macOS, or on Microsoft Windows, use the cargo package manager:

    1. Install the Rust toolchain: see https://rustup.rs/.

    2. Install newdoc:

      $ cargo install newdoc
      

Test that newdoc works:

$ newdoc

Updating newdoc

  • To update newdoc that is installed from RPM on Fedora, RHEL, or CentOS, use the DNF package manager:

    1. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish newdoc packages for unsupported distribution releases.

    2. Refresh repository metadata and update the package:

      # dnf --refresh upgrade newdoc
      
  • To update newdoc installed on openSUSE:

    1. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish newdoc packages for unsupported distribution releases.

    2. Refresh repository metadata:

      # zypper refresh
      
    3. Update the package:

      # zypper update newdoc
      
  • To update newdoc from source, use the cargo package manager:

    1. Update the Rust toolchain:

      $ rustup update
      
    2. Update newdoc:

      $ cargo install newdoc
      

Creating a new module

  1. In the directory where modules are located, use newdoc to create a new file:

    modules-dir]$ newdoc --procedure "Setting up thing"
    

    The tool also accepts the --concept and --reference options. You can use these short forms instead: -p, -c, and -r.

  2. Rewrite the placeholders in the generated file with your docs.

Creating a new assembly

  1. In the directory where assemblies are located, use newdoc to create a new file:

    assemblies-dir]$ newdoc --assembly "Achieving thing"
    

    You can use the short form of the --assembly option instead: newdoc -a "Achieving thing".

  2. Rewrite the placeholders in the generated file with your docs.

    Add AsciiDoc include statements to include modules. See Include Files in the AsciiDoc Syntax Quick Reference.

    Alternatively, you can use the --include-in option when creating the assembly to generate modules and include them automatically, in a single step. See the description in the Options section.

Creating a new snippet file

  1. In the directory where snippets are located, use newdoc to create a new file:

    snippets-dir]$ newdoc --snippet "A reusable note"
    

    You can use the short forms instead: newdoc -s "A reusable note".

  2. Rewrite the placeholders in the generated file with your docs.

Validating a file for Red Hat requirements

You can use the --validate (-l) option to check an existing file for Red Hat publishing requirements. For example:

$ newdoc --validate modules/empty-file.adoc

💾 File: empty-file.adoc
    🔴 Error: The file has no title or headings.
    🔴 Error: The file is missing an ID.
    🔶 Warning: The file is missing the _abstract flag. The flag is recommended but not required.
    🔴 Error: Cannot determine the module type.
$ newdoc --validate modules/con_proper-module.adoc

💾 File: modules/con_proper-module.adoc
    🔷 Information: No issues found in this file.

Options

  • To generate the file without the explanatory comments, add the --no-comments or -C option when creating documents.

  • To generate the file without the example, placeholder content, add the --no-examples or -E option when creating documents.

  • To create the file without the module type prefix in the ID and the file name, add the --no-prefixes or -P option.

  • To specify the directory where newdoc saves the generated file, add the --target-dir=<directory> or -T <directory> option.

  • To generate an assembly with include statements for other generated modules, use the --include-in or -i option:

    $ newdoc --include-in "An assembly for two modules" --concept "First module" --procedure "Second module"
    

    This creates the two modules and an assembly that features the include statements for the modules.

For more options, see the output of the following command:

$ newdoc --help

Release notes

You can find a brief change log in the CHANGELOG.md file.

Additional resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].