gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.54k stars 7.51k forks source link

Improve readability of embedded templates #10900

Open ZhangChengLin opened 1 year ago

ZhangChengLin commented 1 year ago

https://github.com/gohugoio/hugo/blob/9906c1ae52e44f2e8ed45873ea36cd83a9e9bcc0/tpl/tplimpl/embedded/templates/_default/rss.xml#L29-L36

Whether the code can increase the readability, this will not affect the later compression, it should be updated and maintained.

The official documentation feels outdated, so you can only look at the source code. Sometimes the source code is not readable, but Hugo is really easy to use. When can you consider some basic issues.

It's just a personal feeling, if something is wrong, please forgive me, I hope Hugo will get better and better.

jmooring commented 1 year ago

Many (all?) of the embedded templates were created before the release of Go 1.6, which introduced syntax to remove white space ({{- -}}). Tracking progress on this issue...

Templates

Shortcodes

Render hooks

Partials

Other