hugo/hugolib
Bjørn Erik Pedersen bc337e6ab5 Add inline shortcode support
An inline shortcode's name must end with `.inline`, all lowercase.

E.g.:

```bash
{{< time.inline >}}{{ now }}{{< /time.inline >}}
```

The above will print the current date and time.

Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.

This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".

The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax:

```
{{< time.inline />}}
```

Fixes #4011
2018-11-27 16:14:09 +01:00
..
filesystems Handle themes in the new file cache (for images, assets) 2018-11-23 21:09:00 +01:00
pagemeta Run gofmt -s 2018-10-24 00:12:32 +02:00
paths Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
testdata
testsite
404_test.go
alias.go Make WARN the new default log log level 2018-11-03 12:06:23 +01:00
alias_test.go
author.go
case_insensitive_test.go
collections.go
collections_test.go
config.go Add inline shortcode support 2018-11-27 16:14:09 +01:00
config_test.go
datafiles_test.go commands: Show server error info in browser 2018-10-16 22:10:56 +02:00
disableKinds_test.go
embedded_shortcodes_test.go Re-organize the figure shortcode for better readability 2018-10-03 09:55:53 +03:00
embedded_templates_test.go
fileInfo.go commands: Show server error info in browser 2018-10-16 22:10:56 +02:00
gitinfo.go
hugo_info.go
hugo_info_test.go
hugo_sites.go hugolib: Fix changing paginators in lazy render 2018-11-06 11:04:10 +01:00
hugo_sites_build.go hugolib: Continue the file context/line number errors work 2018-10-22 20:46:14 +02:00
hugo_sites_build_errors_test.go Add file (line/col) info to ref/relref errors 2018-11-01 21:06:35 +01:00
hugo_sites_build_test.go Resolve error handling/parser related TODOs 2018-10-23 19:41:22 +02:00
hugo_sites_multihost_test.go
hugo_themes_test.go
language_content_dir_test.go
media.go
menu.go
menu_test.go
minify_publisher_test.go
multilingual.go
orderedMap.go
orderedMap_test.go
page.go hugolib: Fix changing paginators in lazy render 2018-11-06 11:04:10 +01:00
page_content.go Make WARN the new default log log level 2018-11-03 12:06:23 +01:00
page_errors.go hugolib: Continue the file context/line number errors work 2018-10-22 20:46:14 +02:00
page_output.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
page_paths.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
page_paths_test.go
page_permalink_test.go
page_ref.go Add file (line/col) info to ref/relref errors 2018-11-01 21:06:35 +01:00
page_resource.go
page_taxonomy_test.go
page_test.go parser/pageparser: Fix when only shortcode and then summary 2018-11-24 18:23:23 +01:00
page_time_integration_test.go hugolib: Integrate new page parser 2018-10-22 20:46:13 +02:00
page_without_content.go
pagebundler.go hugolib: Rename some page_* files 2018-10-23 22:21:21 +02:00
pagebundler_capture.go Make WARN the new default log log level 2018-11-03 12:06:23 +01:00
pagebundler_capture_test.go hugolib: Rename some page_* files 2018-10-23 22:21:21 +02:00
pagebundler_handlers.go hugolib: Rename some page_* files 2018-10-23 22:21:21 +02:00
pagebundler_test.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
pageCache.go hugolib: Clear the page cache per render 2018-09-21 11:21:15 +02:00
pageCache_test.go
pagecollections.go hugolib: Rename some page_* files 2018-10-23 22:21:21 +02:00
pagecollections_test.go hugolib: Rename some page_* files 2018-10-23 22:21:21 +02:00
pageGroup.go
pageGroup_test.go
pages_language_merge.go hugolib: Deprecate Pages.Sort 2018-09-21 14:23:00 +02:00
pages_language_merge_test.go
pages_related.go
pages_related_test.go
pageSort.go hugolib: Bump to ERROR for the deprecated Pages.Sort 2018-11-01 21:11:45 +01:00
pageSort_test.go hugolib: Deprecate Pages.Sort 2018-09-21 14:23:00 +02:00
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
pagination_test.go
path_separators_test.go hugolib: Integrate new page parser 2018-10-22 20:46:13 +02:00
permalinker.go
permalinks.go helpers: Consolidate MakeSegment vs MakePathSanitized 2018-10-03 15:55:25 +02:00
permalinks_test.go hugolib: Integrate new page parser 2018-10-22 20:46:13 +02:00
prune_resources.go cache/filecache: Add a cache prune func 2018-11-14 23:14:51 +01:00
resource_chain_test.go Add tests for permalink on Resource with baseURL with path 2018-11-15 08:45:15 +01:00
robotstxt_test.go
rss_test.go hugolib: Remove deprecated rssURI 2018-09-21 14:30:57 +02:00
shortcode.go Add inline shortcode support 2018-11-27 16:14:09 +01:00
shortcode_test.go Add inline shortcode support 2018-11-27 16:14:09 +01:00
site.go Add inline shortcode support 2018-11-27 16:14:09 +01:00
site_benchmark_test.go
site_output.go Run gofmt -s 2018-10-24 00:12:32 +02:00
site_output_test.go
site_render.go Resolve error handling/parser related TODOs 2018-10-23 19:41:22 +02:00
site_sections.go hugolib: Allow nil to be unwrapped as *Page 2018-10-03 09:33:42 +03:00
site_sections_test.go hugolib: Allow nil to be unwrapped as *Page 2018-10-03 09:33:42 +03:00
site_stats_test.go
site_test.go cache/filecache: Add a :project placeholder 2018-11-14 23:14:51 +01:00
site_url_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
taxonomy.go
taxonomy_test.go hugolib: Normalize permalink path segments 2018-10-03 11:02:15 +03:00
template_engines_test.go
template_test.go tpl: Fix BOM issue in templates 2018-10-30 18:12:14 +01:00
testhelpers_test.go Add tests for permalink on Resource with baseURL with path 2018-11-15 08:45:15 +01:00
translations.go