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 bool oldJsonFormat; // DMD <= 2.061 41 } 42 43 44 class GeneratorSettings { 45 NavigationType navigationType = NavigationType.moduleTree; 46 /// used for sitemap generation and for determining the URL prefix in registerApiDocs() 47 URL siteUrl = URL("http://localhost:8080/"); 48 /// focus search field on load 49 bool focusSearchField = false; 50 /// Defines how symbol names are mapped to file names when generating file based documentation (useful for case insensitive file systems) 51 MethodStyle fileNameStyle = MethodStyle.unaltered; 52 53 deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.") 54 @property bool lowerCase() const { return fileNameStyle == MethodStyle.lowerCase; } 55 deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.") 56 @property void lowerCase(bool v) { fileNameStyle = MethodStyle.lowerCase; } 57 }