Giter Site home page Giter Site logo

docfxmarkdowngen's Introduction

DocFxMarkdownGen

Generates documentation for a .NET library in Markdown intended for Docusaurus using docfx.

Installation

dotnet tool install -g DocFxMarkdownGen
# now installed as "dfmg", use with "dotnet dfmg" or just "dfmg" if tools are in PATH

Usage

By default dfmg takes it's config from config.yaml, you can override the file using the DFMG_CONFIG environment variable.

outputPath: /home/jan/whatever/docs/api
yamlPath: /home/jan/gen/api
  • outputPath is the path where the generated documentation will be placed, it is always wiped. Can be overriden with the DFMG_OUTPUT_PATH environment variable.
  • yamlPath is the path where the .yml files generated by docfx metadata are placed, probably the api directory where your docfx.json file is. Can be overriden with the DFMG_YAML_PATH environment variable.
  • indexSlug is the slug of the index page, defaults to /api.
  • typesGrouping read below.
  • rewriteInterlinks set this to true if encountering issues with links when building the site.

Types grouping

Example:

# ...
typesGrouping:
  enabled: true
  minCount: 1 # default is 12

If type grouping is enabled, types in namespaces with a number of types greater than or equal to minCount will be grouped by Class, Struct, Interface, Enum and Delegate in the sidebar.

Newlines

Example:

# ...
#brNewline: "  \n" # default is "\n\n"
#forceNewline: true # default is false
#forcedNewline: "  \n" # default is "  \n"
  • brNewline is the string that will be used to replace <br/> tags in the generated markdown.
  • forceNewline if true, will replace all newlines(\n) with forcedNewline.

Example sites

For creating your own site, head to:

  • dfmg-template for a minimalish example
  • dfmg-template2 for a more complete example with versioned docs and CI examples for deploying to GitHub Pages and Vercel from GitHub Actions

This project is not finished, if you find an issue or something missing in the markdown generated, please open an issue or even open a PR!

docfxmarkdowngen's People

Contributors

fabianfrischmann avatar jan0660 avatar luckyluggi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.