Table of Contents

Publish

Preview Site Locally

You can build and preview your site locally by running the following code.

docfx .\Docs\docfx.json --serve

This will serve the site on a local web server at http://localhost:8080. You can stop the preview by entering Ctrl + C in the terminal.

Note

DocFx does not support hot-reload. If you made changes to your site while it was serving, you need to stop and restart the webserver.

Build for Generic Webserver

You can build your website with the following command.

docfx .\Docs\docfx.json

This will create or update the contents under .\Docs\_site. Building the site does essentially the same as --serve but it won't start a local web server to preview the site.

You can now copy the files in the .\Docs\_site directory and upload them to any webserver you want. For automated deployments to SharePoint or Azure services, see the articles below.

Next Steps