1 /** 2 Contains definitions for customizing DDOX behavior. 3 4 Copyright: © 2012 RejectedSoftware e.K. 5 License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. 6 Authors: Sönke Ludwig 7 */ 8 module ddox.settings; 9 10 import vibe.inet.url; 11 public import vibe.web.common : MethodStyle; 12 13 enum SortMode { 14 none, 15 name, 16 protectionName, 17 protectionInheritanceName, 18 19 None = none, 20 Name = name 21 } 22 23 enum NavigationType { 24 moduleList, 25 moduleTree, 26 declarationTree, 27 28 ModuleList = moduleList, 29 ModuleTree = moduleTree, 30 DeclarationTree = declarationTree, 31 } 32 33 class DdoxSettings { 34 NavigationType navigationType = NavigationType.moduleTree; 35 SortMode moduleSort = SortMode.protectionName; 36 SortMode declSort = SortMode.protectionInheritanceName; 37 string[] packageOrder; 38 bool inheritDocumentation = true; 39 bool mergeEponymousTemplates = true; 40 } 41 42 43 class GeneratorSettings { 44 NavigationType navigationType = NavigationType.moduleTree; 45 /// used for sitemap generation and for determining the URL prefix in registerApiDocs() 46 URL siteUrl = URL("http://localhost:8080/"); 47 /// focus search field on load 48 bool focusSearchField = false; 49 /// Defines how symbol names are mapped to file names when generating file based documentation (useful for case insensitive file systems) 50 MethodStyle fileNameStyle = MethodStyle.unaltered; 51 52 /// Creates a page per enum member instead of putting everything into a single table. 53 bool enumMemberPages; 54 55 deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.") 56 @property bool lowerCase() const { return fileNameStyle == MethodStyle.lowerCase; } 57 deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.") 58 @property void lowerCase(bool v) { fileNameStyle = MethodStyle.lowerCase; } 59 }