hugo/hugolib
Bjørn Erik Pedersen 08fdca9d93 Add Markdown diagrams and render hooks for code blocks
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates #7765
Closes #9538
Fixes #9553
Fixes #8520
Fixes #6702
Fixes #9558
2022-02-24 18:59:50 +01:00
..
assets/images
filesystems Fix duplicate mount sources 2022-01-26 20:32:13 +01:00
paths
testdata
testsite Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
404_test.go
alias.go
alias_test.go
breaking_changes_test.go
cascade_test.go Fix BenchmarkCascadeTarget 2022-02-16 13:23:43 +01:00
case_insensitive_test.go
codeowners.go Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
collections.go
collections_test.go
config.go Misc depreation updates 2022-01-04 17:10:39 +01:00
config_test.go
configdir_test.go
content_factory.go
content_factory_test.go
content_map.go
content_map_page.go Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
content_map_test.go
content_render_hooks_test.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
datafiles_test.go
dates_test.go
disableKinds_test.go
embedded_shortcodes_test.go deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0 2022-02-15 10:37:14 +01:00
embedded_templates_test.go
fileInfo.go
fileInfo_test.go
gitinfo.go
hugo_modules_test.go Fix duplicate mount sources 2022-01-26 20:32:13 +01:00
hugo_sites.go Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
hugo_sites_build.go
hugo_sites_build_errors_test.go
hugo_sites_build_test.go
hugo_sites_multihost_test.go
hugo_sites_rebuild_test.go
hugo_smoke_test.go Add hugo.Deps 2022-01-11 18:06:23 +01:00
image_test.go
integrationtest_builder.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
language_content_dir_test.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
language_test.go
menu_test.go
minify_publisher_test.go
mount_filters_test.go
multilingual.go
page.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
page__common.go Add support for CODEOWNERS 2022-02-23 22:43:19 +01:00
page__content.go
page__data.go
page__menus.go
page__meta.go Fix erroneous warning with .Page.RenderString on a page without a backing file 2022-01-28 17:35:49 +01:00
page__new.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
page__output.go Make the RenderString content provider fix more general 2022-01-27 11:51:13 +01:00
page__paginator.go
page__paths.go
page__per_output.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
page__position.go
page__ref.go
page__tree.go
page_kinds.go
page_permalink_test.go
page_test.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
page_unwrap.go
page_unwrap_test.go
pagebundler_test.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
pagecollections.go
pagecollections_test.go
pages_capture.go
pages_capture_test.go
pages_language_merge_test.go
pages_process.go Fix "stuck on build" in error situations in content processing 2021-12-23 15:09:27 +01:00
pages_test.go
paginator_test.go
permalinker.go
prune_resources.go
resource_chain_test.go deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29 2022-02-15 17:36:29 +01:00
robotstxt_test.go
rss_test.go
securitypolicies_test.go Add resources.GetRemote 2021-12-17 09:33:51 +01:00
shortcode.go
shortcode_page.go
shortcode_test.go Remove mmark 2022-01-04 17:10:39 +01:00
site.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
site_benchmark_new_test.go
site_output.go
site_output_test.go Fix surprise OutputFormat.Rel overwriting 2022-01-04 10:38:38 +01:00
site_render.go
site_sections.go Add Markdown diagrams and render hooks for code blocks 2022-02-24 18:59:50 +01:00
site_sections_test.go
site_stats_test.go
site_test.go Misc depreation updates 2022-01-04 17:10:39 +01:00
site_url_test.go
siteJSONEncode_test.go
sitemap_test.go
taxonomy.go
taxonomy_test.go
template_test.go tpl/collections: Fix apply with namespaced template funcs 2022-01-17 09:50:48 +01:00
testhelpers_test.go Add a migration test helper 2022-02-09 16:38:12 +01:00
translations.go