YARD

YARD is a documentation generation tool for the Ruby programming language.

YAML Configuration

yard:

  • config-file:

    • Path to the YARD configuration file (.yardopts).
    • If this field is omitted:
      • Docstand automatically searches for .yardopts under your repository and uses it to build documentation.
      • In case when .yardopts has not been found, Docstand runs YARD with its default configuration.
  • input:

    • If this field is omitted, Docstand passes no argument to YARD.
  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.5 CPU with 1920 MiB RAM.

  • options:

    Below is the list of supported options:

    General Options:
            --exclude REGEXP             Ignores a file if it matches path match (regexp)
    
    Output options:
            --no-public                  Don't show public methods. (default shows public)
            --protected                  Show protected methods. (default hides protected)
            --private                    Show private methods. (default hides private)
            --no-private                 Hide objects with @private tag
            --[no-]api API               Generates documentation for a given API
                                        (objects which define the correct @api tag).
                                        If --no-api is given, displays objects with
                                        no @api tag.
            --hide-api API               Hides given @api tag from documentation
            --embed-mixins               Embeds mixin methods into class documentation
            --embed-mixin [MODULE]       Embeds mixin methods from a particular
                                          module into class documentation
            --no-highlight               Don't highlight code blocks in output.
            --default-return TYPE        Shown if method has no return type.
                                          (defaults to 'Object')
            --hide-void-return           Hides return types specified as 'void'.
                                          (default is shown)
            --query QUERY                Only show objects that match a specific query
            --title TITLE                Add a specific title to HTML documents
        -r, --readme, --main FILE        The readme file used as the title page
                                          of documentation.
            --files FILE1,FILE2,...      Any extra comma separated static files to be
                                          included (eg. FAQ)
            --asset FROM[:TO]            A file or directory to copy over to output
                                         directory after generating
        -m, --markup MARKUP              Markup style used in documentation, like textile,
                                          markdown or rdoc. (defaults to rdoc)
            --charset ENC                Character set to use when parsing files
                                          (default is system locale)
        -t, --template TEMPLATE          The template to use. (defaults to "default")
        -p, --template-path PATH         The template path to look for templates in.
                                          (used with -t).
            --locale LOCALE              The locale for generated documentation.
                                          (defaults to en)
            --po-dir DIR                 The directory that has .po files.
                                          (defaults to po)
    
    Tag options: (TAG:TITLE looks like: 'overload:Overloaded Method')
            --tag TAG:TITLE              Registers a new free-form metadata @tag
            --type-tag TAG:TITLE         Tag with an optional types field
            --type-name-tag TAG:TITLE    Tag with optional types and a name field
            --name-tag TAG:TITLE         Tag with a name field
            --title-tag TAG:TITLE        Tag with first line as title field
            --hide-tag TAG               Hides a previously defined tag from templates
            --transitive-tag TAG         Marks a tag as transitive
            --non-transitive-tag TAG     Marks a tag as not transitive
    
    Other options:
        -e, --load FILE                  A Ruby script to load before running command.
            --plugin PLUGIN              Load a YARD plugin (gem with `yard-' prefix)
            --legacy                     Use old style Ruby parser and handlers.
                                          Always on in 1.8.x.
    

Examples

  • With yard set to default

    docstand:
      yard: default
    
  • With custom machine:

    docstand:
      yard:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With config-file option

    docstand:
      yard:
        config-file: ruby/.yardopts
    
  • With input option

    docstand:
      yard:
        input:
          - src/**/*.rb
          - lib/**/*.rb
    

results matching ""

    No results matching ""