我是doxygen的新手,我不确定它是否可行,但我希望在我的树层次结构导航视图中有一些与主/索引页面相同的链接,而不是主页的子页面。谢谢你的帮助
答案 0 :(得分:1)
有可能吗?是。
自动化且简单吗?否。
最常用且最困难的方法是从自定义页眉,页脚和样式表文件的doxygen机制开始,并构建完全自定义的菜单系统。如果您对HTML / CSS知之甚少,这可能是一个很高的要求。您需要为要包含的每个菜单设计提供自定义部件。如果你想沿着那条路向前走,请在doxygen的Customizing the output页面上阅读基础知识。
另一个选项是在生成后调整doxygen菜单。这是一个手动步骤,每次构建文档时都需要重做。但它需要的是修改doxygen生成的navtreedata.js
文件以进行所需的更改。该文件具有以下结构(这是一个示例,可能与您的不同):
var NAVTREE =
[
[ "Utility Library", "index.html", [
[ "Main Page", "index.html", null ],
[ "Classes", "annotated.html", [
[ "Class List", "annotated.html", "annotated_dup" ],
[ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
[ "Class Members", "functions.html", [
[ "All", "functions.html", null ],
[ "Functions", "functions_func.html", null ]
] ],
[ "Class Index", "classes.html", null ]
] ],
[ "Files", null, [
[ "File List", "files.html", "files" ]
] ],
[ "Examples", "examples.html", "examples" ]
] ]
];
var NAVTREEINDEX =
[
".html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
您可以在这里更改导航,因为我已添加了下面的“第二级菜单输入”项。显然,您可以根据需要提供子页面等。
var NAVTREE =
[
[ "Utility Library", "index.html", [
[ "Main Page", "index.html", null ],
[ "Classes", "annotated.html", [
[ "Class List", "annotated.html", "annotated_dup" ],
[ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
[ "Class Members", "functions.html", [
[ "All", "functions.html", null ],
[ "Functions", "functions_func.html", null ]
] ],
[ "Class Index", "classes.html", null ]
] ],
[ "Files", null, [
[ "File List", "files.html", "files" ]
] ],
[ "Examples", "examples.html", "examples" ]
] ],
[ "SECOND LEVEL MENU ENTRY", "sample-file-secondary.html", [
] ]
];
var NAVTREEINDEX =
[
".html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
如果您想要修改顶部菜单栏视图,可以通过编辑文件menudata.js
以类似的方式执行此操作。希望这有帮助!