-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: broken documentation indexing with correct URLs #615
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package nl.avisi.structurizr.site.generatr.site.model.indexing | ||
|
||
import com.structurizr.model.Container | ||
import nl.avisi.structurizr.site.generatr.site.asUrlToDirectory | ||
import nl.avisi.structurizr.site.generatr.site.model.PageViewModel | ||
import nl.avisi.structurizr.site.generatr.site.model.SoftwareSystemContainerDecisionPageViewModel | ||
import nl.avisi.structurizr.site.generatr.site.model.contentText | ||
|
||
fun softwareSystemContainerDecisions(container: Container, viewModel: PageViewModel) = container | ||
.documentation | ||
.decisions | ||
.map { decision -> | ||
Document( | ||
SoftwareSystemContainerDecisionPageViewModel.url( | ||
container, | ||
decision | ||
).asUrlToDirectory(viewModel.url), | ||
"Container Decision", | ||
"${container.name} | ${decision.title}", | ||
"${decision.title} ${decision.contentText()}".trim() | ||
) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package nl.avisi.structurizr.site.generatr.site.model.indexing | ||
|
||
import com.structurizr.model.Container | ||
import nl.avisi.structurizr.site.generatr.site.asUrlToDirectory | ||
import nl.avisi.structurizr.site.generatr.site.model.* | ||
|
||
fun softwareSystemContainerSections(container: Container, viewModel: PageViewModel) = container | ||
.documentation | ||
.sections | ||
.map { section -> | ||
Document( | ||
SoftwareSystemContainerSectionPageViewModel.url( | ||
container, | ||
section | ||
).asUrlToDirectory(viewModel.url), | ||
"Container Documentation", | ||
"${container.name} | ${section.contentTitle()}", | ||
"${section.contentTitle()} ${section.contentText()}".trim() | ||
) | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you mind adding tests for While at it, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jenspav added, please review. I didn't quite catch the last comment, this is actually testing no software system documentation and has nothing to do with containers, so I'm unsure what you referring there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sry, typo on my side, what I meant was: Could you please also rename this function https://github.com/avisi-cloud/structurizr-site-generatr/blob/main/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/IndexingTest.kt#L282 to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jenspav done, please review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed this one earlier, could you please remove this empty line? Everything else LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jenspav done!