简体   繁体   English

如何将Markdown文件指定为Doxygen中的另一个选项卡?

[英]How do I specify a Markdown file as another tab in Doxygen?

Consider a project that has the following two files. 考虑一个具有以下两个文件的项目。 Note that OtherTab.md lives in a subdirectory. 请注意, OtherTab.md位于子目录中。

README.md 自述文件

# This is the main page.

Main Page contents.

wiki/OtherTab.md Wiki / OtherTab.md

# This is another tab

Contents for another tab.

Now, I run Doxygen -g to generate a Doxyfile . 现在,我运行Doxygen -g生成一个Doxyfile I add the following lines to the Doxyfile . Doxyfile添加到Doxyfile

USE_MDFILE_AS_MAINPAGE = README.md
INPUT                  = . wiki

I would like to add a tab called Wiki next to the Main Page tab, which points at the file wiki/OtherTab.md . 我想在Main Page选项卡旁边添加一个名为Wiki选项卡,该选项卡指向文件wiki/OtherTab.md

How might I accomplish this? 我该怎么做?

I have looked this question , and this documentation , but neither addresses the question of how to actually create a new tab in Doxygen and point it at the html generated by processing a particular Markdown file. 我看过这个问题这个文档 ,但是都没有解决如何在Doxygen中实际创建新选项卡并将其指向通过处理特定Markdown文件生成的html的问题。

Additionally, I have attempted to use this answer to my previous question, but was not sure what to put in the url attribute of the tab tag. 此外,我尝试使用这个答案回答上一个问题,但不确定在tab标记的url属性中添加什么。

Appear some amount of experimentation, it appears that there is a standard transformation that is applied to the names of Markdown files. 进行了一些实验,似乎有一个适用于Markdown文件名称的标准转换。

Thus, the following steps will create a new tab pointing at the Markdown file. 因此,以下步骤将创建一个指向Markdown文件的新选项卡。

  1. Generate a layout file with doxygen -l . 使用doxygen -l生成布局文件。
  2. In the Doxyfile set LAYOUT_FILE = DoxygenLayout.xml . 在Doxyfile中,设置LAYOUT_FILE = DoxygenLayout.xml
  3. In the DoxygenLayout.xml file, add the following tab. DoxygenLayout.xml文件中,添加以下选项卡。

     <tab type="user" visible="yes" url="md_wiki_OtherTab.html" title="Wiki"/> 

The standard filename transformation is md_{path_to_markdown_without_extension}.html . 标准文件名转换为md_{path_to_markdown_without_extension}.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM