hugo/hugolib
Austin Ziegler 112c3c5c04 Provide (relative) reference funcs & shortcodes.
-   `.Ref` and `.RelRef` take a reference (the logical filename for a
    page, including extension and/or a document fragment ID) and return
    a permalink (or relative permalink) to the referenced document.

    -   If the reference is a page name (such as `about.md`), the page
        will be discovered and the permalink will be returned: `/about/`
    -   If the reference is a page name with a fragment (such as
        `about.md#who`), the page will be discovered and used to add the
        `page.UniqueID()` to the resulting fragment and permalink:
        `/about/#who:deadbeef`.
    -   If the reference is a fragment and `.*Ref` has been called from
        a `Node` or `SiteInfo`, it will be returned as is: `#who`.
    -   If the reference is a fragment and `.*Ref` has been called from
        a `Page`, it will be returned with the page’s unique ID:
        `#who:deadbeef`.

-   `.*Ref` can be called from either `Node`, `SiteInfo` (e.g.,
    `Node.Site`), `Page` objects, or `ShortcodeWithPage` objects in
    templates.

-   `.*Ref` cannot be used in content, so two shortcodes have been
    created to provide the functionality to content: `ref` and `relref`.
    These are intended to be used within markup, like `[Who]({{% ref
    about.md#who %}})` or `<a href="{{% ref about.md#who %}}">Who</a>`.

-   There are also `ref` and `relref` template functions (used to create
    the shortcodes) that expect a `Page` or `Node` object and the
    reference string (e.g., `{{ relref . "about.md" }}` or `{{
    "about.md" | ref . }}`). It actually looks for `.*Ref` as defined on
    `Node` or `Page` objects.

-   Shortcode handling had to use a *differently unique* wrapper in
    `createShortcodePlaceholder` because of the way that the `ref` and
    `relref` are intended to be used in content.
2014-12-18 22:18:36 -05:00
..
benchmark_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
handler_base.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_file.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_meta.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_page.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
menu.go Implement HasMenuCurrent and IsMenuCurrent for Nodes 2014-11-01 22:34:49 -04:00
menu_test.go Revert "Make Urls in menus respect CanonifyUrls" 2014-12-11 05:33:40 +01:00
node.go Provide (relative) reference funcs & shortcodes. 2014-12-18 22:18:36 -05:00
page.go Provide (relative) reference funcs & shortcodes. 2014-12-18 22:18:36 -05:00
page_permalink_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
page_taxonomy_test.go fix tags not being in lowercase, #491 2014-09-11 17:03:31 -04:00
page_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
page_time_integration_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
pageGroup.go Fix GroupBy function issues 2014-11-13 22:48:58 -05:00
pageGroup_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
pageSort.go Add sort and grouping functions for publish date and param of Page 2014-11-01 22:41:04 -04:00
pagesPrevNext.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
pagesPrevNext_test.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
path_seperators_test.go converted path 2 filepath 2014-11-13 22:38:21 -05:00
path_seperators_windows_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
permalinks.go Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
permalinks_test.go Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
planner.go New targets & new renderers and write methods [WIP] 2014-11-04 00:39:37 -05:00
redis.cn.md Adding benchmark for parsing pages using unicode. 2013-08-09 17:36:32 -07:00
rss_test.go Various fixes in RSS feed generation 2014-11-17 18:55:40 -05:00
shortcode.go Provide (relative) reference funcs & shortcodes. 2014-12-18 22:18:36 -05:00
shortcode_test.go Provide (relative) reference funcs & shortcodes. 2014-12-18 22:18:36 -05:00
shortcodeparser.go Shortcode rewrite, take 2 2014-11-17 18:32:06 -05:00
shortcodeparser_test.go Shortcode rewrite, take 2 2014-11-17 18:32:06 -05:00
site.go Provide (relative) reference funcs & shortcodes. 2014-12-18 22:18:36 -05:00
site_show_plan_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
site_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
site_url_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
siteinfo_test.go Fix permalink functionality, which was broken in 62dd1d4. 2014-05-12 15:47:52 -04:00
sitemap.go Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
sitemap_test.go Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests. 2014-11-04 00:41:47 -05:00
summary.go Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
taxonomy.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
taxonomy_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00