-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add sitemaps plugin #2009
base: master
Are you sure you want to change the base?
Add sitemaps plugin #2009
Conversation
|
||
data class SitemapConfiguration( | ||
var baseUrl: String? = defaultBaseUrl, | ||
var relativeOutputLocation: String? = defaultRelativeOutputLocation |
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.
This can probably be non-null because of the default
private val maybeConfiguration = configuration<SitemapPlugin, SitemapConfiguration>(context) | ||
|
||
override fun invoke(input: RootPageNode): RootPageNode { | ||
val baseUrl: String = maybeConfiguration?.baseUrl ?: "".also { |
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.
You can use maybeConfiguration?.baseUrl ?: run { warn(...) ; it.orEmpty() }
which is IMHO a little cleaner, but doesn't really matter that much
locationResolver: DriResolver, | ||
baseUrl: String | ||
): Set<String> { | ||
val baseUrlWithSlash = baseUrl.takeIf { it.endsWith("/") || it.isEmpty() } ?: "$baseUrl/" |
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.
Or just baseUrl.removeSuffix("/") + "/"
Bumps [korte-jvm](https://github.com/korlibs/korte) from 2.0.7 to 2.2.0. - [Release notes](https://github.com/korlibs/korte/releases) - [Commits](https://github.com/korlibs/korte/compare/v2.0.7...v2.2.0) --- updated-dependencies: - dependency-name: com.soywiz.korlibs.korte:korte-jvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
de135ce
to
4397c96
Compare
No description provided.