From 64c441dee6b65a06c1641a101d3125d655da728c Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 24 Oct 2016 14:12:11 -0400 Subject: [PATCH] notes --- notes/0.2.5.markdown | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/notes/0.2.5.markdown b/notes/0.2.5.markdown index ae425c6d..d4063def 100644 --- a/notes/0.2.5.markdown +++ b/notes/0.2.5.markdown @@ -2,7 +2,53 @@ - Fixes css/js theme generation. [#30][30] by [@gsechaud][@gsechaud] - Fixes ref bug with anchor. [#34][34] by [@gsechaud][@gsechaud] +- snippet.base_dir. See below. +- image.base_url. See below. + +### snippet.base_dir + +In order to specify your snippet source paths off a certain base directory +you can define a `snippet.base_dir` property either in the page's front matter +or globally like this (for example): + +```sbt +paradoxProperties in Compile ++= Map( + "snippet.base_dir" -> s"${(sourceDirectory in Test).value}/scala/org/example" +) +``` + +You can then refer to this snippet base directory by starting a snippet path with `.../`, e.g. + +``` +@@snip [Hello.scala](.../Hello.scala) { #hello_example } +``` + +### image.base_url + +When placing images via the standard markdown image syntax you can refer +to a configured base URL by starting the image href with `.../`, e.g. like this: + +``` +![logo](.../logo.png) +``` + +The `...` prefix refers to a defined a `image.base_url` property that is +specified either in the page's front matter or globally like this (for example): + +```sbt +paradoxProperties in Compile ++= Map("image.base_url" -> ".../assets/images") +``` + +If the image base URL itself starts with three dots (`...`) then these in turn +refer to the root URL of the site. + +**NOTE**: As with the other "Parameterized Links" directives this feature will not +allow GitHub to preview the images correctly on the web interface. + + [#39][39] by [@sirthias][@sirthias] [30]: https://github.com/lightbend/paradox/pull/30 [34]: https://github.com/lightbend/paradox/pull/34 + [39]: https://github.com/lightbend/paradox/pull/39 [@gsechaud]: https://github.com/gsechaud + [@sirthias]: https://github.com/sirthias