docs, tpl: Fix documentation of UniqueID
authordigitalcraftsman <digitalcraftsman@protonmail.com>
Sat, 31 Dec 2016 16:55:03 +0000 (17:55 +0100)
committerdigitalcraftsman <digitalcraftsman@protonmail.com>
Sat, 31 Dec 2016 16:55:03 +0000 (17:55 +0100)
See #2861

docs/content/templates/variables.md
source/file.go

index db00ebcd5834f690a7d86e657bbdbf4931ca0cf5..e914f24fdf111553b4782c3e77baffaf85d84dbc 100644 (file)
@@ -68,7 +68,7 @@ matter, content or derived from file location.
 **.Truncated** A boolean, `true` if the `.Summary` is truncated.  Useful for showing a "Read more..." link only if necessary.  See [Summaries](/content/summaries/) for more details.<br>
 **.Type** The content [type](/content/types/) (e.g. post).<br>
 **.URL** The relative URL for this page. Note that if `URL` is set directly in frontmatter, that URL is returned as-is.<br>
-**.UniqueID** The MD5-checksum of the page's filename<br>
+**.UniqueID** The MD5-checksum of the content file's path<br>
 **.Weight** Assigned weight (in the front matter) to this content, used in sorting.<br>
 **.WordCount** The number of words in the content.<br>
 
index 467c48223435c4d821ca731a5f30960a7dd38832..18ed9d6f980f60b53fd00ed04831287a6a1c18fd 100644 (file)
@@ -32,13 +32,13 @@ type File struct {
        section     string // The first directory
        dir         string // The relative directory Path (minus file name)
        ext         string // Just the ext (eg txt)
-       uniqueID    string // MD5 of the filename
+       uniqueID    string // MD5 of the file's path
 
        translationBaseName string // `post` for `post.es.md` (if `Multilingual` is enabled.)
        lang                string // The language code if `Multilingual` is enabled
 }
 
-// UniqueID is the MD5 hash of the filename and is for most practical applications,
+// UniqueID is the MD5 hash of the file's path and is for most practical applications,
 // Hugo content files being one of them, considered to be unique.
 func (f *File) UniqueID() string {
        return f.uniqueID