docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Is there any demo of using overwriting with docfx v3?

Open gggdttt opened this issue 2 years ago • 1 comments

Operating System: Windows

DocFX Version Used: 3

Template used: dynamic 365 business center

Steps to Reproduce:

  1. Follow all the steps shown in https://dotnet.github.io/docfx/tutorial/intro_overwrite_files.html
  2. Tried both docfx.json and docfx.yml file. All the overwriting .md file is put under folder content, with uid specified.
globalMetadata:
  titleSuffix: My Awesome Website
overwrite: content/**.md
exclude: 
- ./template/**
template: template
  1. The page can not show overwriting content correctly.

Expected Behavior:

Actual Behavior:

gggdttt avatar Oct 14 '22 00:10 gggdttt

I am not sure if the guidance is only for docfx v2? Because I tried docfx2 and it worked. But when I changed to docfx3, it fails to render.

gggdttt avatar Oct 14 '22 00:10 gggdttt

According to https://github.com/dotnet/docfx/issues/4586#issuecomment-494291244, DocFX v3 supports only "Markdown fragments" files, not YAML overwrite files.

KalleOlaviNiemitalo avatar Oct 20 '22 08:10 KalleOlaviNiemitalo

@KalleOlaviNiemitalo Thank you so much!

gggdttt avatar Oct 20 '22 15:10 gggdttt

Hi, sorry to reopen this issue. Now I am following markdown fragment, but I don't know why it does not work completely. Now my file is:

  • override
    • test.md
  • ref
    • String.yml

The content of test.md is :

# `System.String`
```  yaml
author: rpetrusha
ms.author: ronpet
manager: wpickett
name: this is a test
```
## `examples`
Fragment version

And my String.yml is

#YamlMime:NetEnum
uid: System.String
name: String
examples: Origin verison.

After follow the guidance, I don't know why the Origin version is not replaced with fragment version . The content of string.html does not change. Should I change some config in docfx.yml?

gggdttt avatar Nov 09 '22 14:11 gggdttt

My config is:

template: ./template/
exclude: ./template/**
globalMetadata:
  titleSuffix: My Awesome Websites

which is generated by docfx init.

gggdttt avatar Nov 09 '22 22:11 gggdttt

Markdown fragment is also not supported in docfx v3.

yufeih avatar Dec 13 '22 04:12 yufeih