spf13/hugo — pull request #479 by natefinch (2014-09-05 09:32:09+00:00)
Title: add Name to File, which is the filename minus the extension

This is useful as a shorthand reference to the piece of content, kind of like referencing it by slug, except it works even if you're not setting slugs.

This is useful for wiki-style links in shortcodes. This lets you use a shortcode like this:

{{% link boston %}}

and then in link.html:
```
{{$name := .Get 0}}

{{range .Page.Site.Recent }}
{{if eq .File.Name $name }}
{{.LinkTitle}}
{{ end }}
{{end}}
```

If you have a piece of content that is boston.md, it'll create a link for it in the output with the rght oermalink url and correct title, and even if the link to the content changes or the title changes, this will stay up to date.

You can do this currently by just using .File.Filename, and passing it boston.md, but that's pretty ugly.