Giter Site home page Giter Site logo

docfx-example-for-lupin's Introduction

DocFx Min Example

Just a minimal example for lupin.

  • The example project is contained in the /source directory.
  • the /docs directory is where you can write custom markdown articles to include in your site, like getting started pages or whatever
  • index.md is the landing page
  • toc.yml is the initial table of contents for the site, which is how the top navigation bar is built.

Look at the docfx.json configuration file.

  • The metadata section is what tells it where to look for csproj files to generate the api documentation. In this case it's telling it to look for that specific csproj file (relative path from the docfx.json) and to output the metadata it builds in a directory called api
"metadata": [
{
    "src": [
    {
        "files": [ "source/ExampleProject/ExampleProject.csproj"]
    }
    ],
    "dest": "api"
}
]
  • The build section tells it what to actually build when it generates the site
    • content tells it what content files to look for (in this case any md or yml files)
    • exclude tells it what to exclude (we don't want it rerendering the _site over and over in an infinite loop)
    • resources are the locations to resource files like images if you create documentation is the docs folder
    • output is where the build is output to
    • template is the template to use. Docfx only has two standard out of the box templates: default and modern. Modern requires default so you need to include both.
"build": {
"content": [
    {
    "files": [
        "**/*.{md,yml}"
    ],
    "exclude": [
        "_site/**"
    ]
    }
],
"resource": [
    {
    "files": [
        "images/**"
    ]
    }
],
"output": "_site",
"template": [
    "default",
    "modern"
],

Then when you want to serve the site locally to view it just run dotnet docfx --serve When you want to build it to deploy run dotnet docfx build

docfx-example-for-lupin's People

Contributors

aristurtledev 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.