|
|
||||||
SnipSnap ExtensionsSome simple but useful extensions to SnipSnap, an open source system for managing weblog (blog) and wiki type content. A Note on Installing Macros Relative Link Macro Type: macro RelativeLinkMacro is a SnipSnap macro for snip-relative and "view"-relative links, loosely based on org.radeox.macro.LinkMacro. Snip-relative links remain relative to their containing snip when that snip is imported with {include-rel:<snip>}. View-relative links provide a way to link to anchors on the same displayed page, regardless of the snip that they reside in. SnipSnap instances with a proxy and prefix paths are also supported. Internally the macro expands a snip-relative path to the correct site relative path. RelativeLinkIncludeMacroPatch is based on the PersonalIncludeMacro found here. This is a replacement for the {!snipname} macro that provides for the correct functioning of the RelativeLinkMacro ({link-rel}) in the included snips. At least in SnipSnap 1.0b2-uttoxeter the SnipRenderContext attribute "SnipRenderContext.snip" is not updated in the SnipRenderContext of snips included with {!snipname}. This causes the macros in snips that are included with {!snipname} to incorrectly identify the snip in which they exist, thus breaking the {link-rel} macro. CSS Format Macro Type: macro CSSFormatMacro uses HTML span tags to apply arbitrary CSS style classes to SnipSnap content. (Note that block level styling can be applied with a span tag if "display: block;" is included on the style properties.) A good way to add site wide CSS classes is to edit "SnipSnap/themes/<theme-name>/css" to add another CSS file, like "@import url(css/format.css);". Then create a new snip "SnipSnap/themes/<theme-name>/css/format.css" and add CSS styles to it such as ".highlight-yellow { padding: 2px; background: #ff0; }". Wherever you needed highlighted text, you could then use "{format:highlight-yellow}some content{format}" in your snips.
|
||||||