File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,17 @@ private static async Task<IResult> ServeDocumentationFile(ReloadableGeneratorSta
148
148
{
149
149
var generator = holder . Generator ;
150
150
151
- var s = Path . GetExtension ( slug ) == string . Empty ? slug + " .md" : slug ;
151
+ var s = Path . GetExtension ( slug ) == string . Empty ? Path . Combine ( slug , "index .md") : slug ;
152
152
if ( ! generator . DocumentationSet . FlatMappedFiles . TryGetValue ( s , out var documentationFile ) )
153
153
{
154
- foreach ( var extension in generator . Context . Configuration . EnabledExtensions )
154
+ s = Path . GetExtension ( slug ) == string . Empty ? slug + ".md" : s . Replace ( "/index.md" , ".md" ) ;
155
+ if ( ! generator . DocumentationSet . FlatMappedFiles . TryGetValue ( s , out documentationFile ) )
155
156
{
156
- if ( extension . TryGetDocumentationFileBySlug ( generator . DocumentationSet , slug , out documentationFile ) )
157
- break ;
157
+ foreach ( var extension in generator . Context . Configuration . EnabledExtensions )
158
+ {
159
+ if ( extension . TryGetDocumentationFileBySlug ( generator . DocumentationSet , slug , out documentationFile ) )
160
+ break ;
161
+ }
158
162
}
159
163
}
160
164
You can’t perform that action at this time.
0 commit comments