Skip to content

Commit

Permalink
Expose property for relative source path
Browse files Browse the repository at this point in the history
  • Loading branch information
justinp committed Sep 30, 2022
1 parent ca7d6cb commit db39333
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ class ParadoxProcessor(
lazy val getAbsolute: PageLink =
PageLink(location, location.map(_.root.tree.label).getOrElse(current), writer, context)
lazy val isActive: Boolean = location.exists(active)
lazy val getRelative: String = location.map { l =>
val root = new File(".").getCanonicalFile.toString
Path.relativeLocalPath(root, l.tree.label.file.getPath)
}.orNull

private def link(location: Location[Page]): String = {
val node =
Expand Down

0 comments on commit db39333

Please sign in to comment.