From: Ahsanul Haque Date: Thu, 11 Dec 2014 20:57:25 +0000 (+0600) Subject: Commenting helpers package X-Git-Tag: v0.13~256 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2c8e9a79313f91a55e5c99fd20f88acc4035bd2d;p=brevno-suite%2Fhugo Commenting helpers package --- diff --git a/helpers/content.go b/helpers/content.go index 9b46bbe8..1b0aea32 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//Package helpers implements general utility functions that work with and on content. package helpers import ( @@ -26,9 +27,13 @@ import ( "strings" ) +// Length of the summary that Hugo extracts from a content. var SummaryLength = 70 + +// Custom divider "" let's user define where summarization ends. var SummaryDivider = []byte("") +//StripHTML accepts a string, strips out all HTML tags and returns it. func StripHTML(s string) string { output := "" @@ -61,10 +66,12 @@ func StripHTML(s string) string { return output } +// StripEmptyNav strips out empty