mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
346b60358d
73a01565cRemove comment shortcode documentation0ca7ccd30Replace usage of comment shortcode with HTML commentsfe10d9899Remove expired new-in labels11e89dfcb[editorial] Link to proper render-hook page in relref.md11a581c2fnetlify: Hugo 0.142.01a4fcf7f7Miscellaneous edits2c7a3165fMarkdown linting and cleanup69d7a781bReplace links to glossary terms with custom render hook syntax441752d2dRefactor glossary lookup portion of link render hook80109a14fFix glossary term linking for plural formcd95f0f34Update link render hook to support glossary links53eadb430Remove the glossary template1d40a7f3bImprove transform.ToMath examples586970df2Misc edits6a06a8de7Add glossary link shortcode4171c0eb7Improve description of masking with non-transparent images41c8feb64Fix example of image.Mask filter704a81656Add alignx option to images.Text usage example7c03eb0ccClarify context in example of using the try statement56d9c9b71Refactor glossary of terms042a6846bAdd expiry dates to deprecated methods pages365ab345fRemove services key from instagram shortcode pageb7fe31e07Reorder options list for images.Text filter8051ff818Format directory names, file names, and file paths as coded09a14623Update version refs for Hugo and Dart Sass3bb006974Add NODE_VERSION to Netlify config examples3a0f2531eFix typo7e3198eafFix typocf56452a3Fix typoa9f51d13eFix typo82bfdd8c3Fix typoa5c41a053Fix typoabcfed7a5Fix typo8c1debf3aRemove outdated new-in badges809ddf9efUpdate theme63867d56fUse warnf instead of errorf in try-catch exampledee3e5f09Update theme9791f7057Remove TODO from comment shortcode examplesa346ca1fdElevate embedded shortcode documentation to its own section8fa19b50fhugoreleaser.toml => hugoreleaser.yaml575d60345Update docs for v0.141.0a0a442d62netlify: Hugo 0.141.06667cbcd8Merge commit '81a7b6390036138356773c87a886679c81c524e1'f36fc013edocs: Regen CLI docs365a47dedtpl/images: Change signature of images.QR to images.QR TEXT OPTIONSae8f8af0aimages.Text: Add "alignx" option for horizontal alignment8f45ccca6docs: Regen CLI docsf0e6304f4Merge commit 'e9fbadacc3f09191e2e19f112a49777eeb8df06c'cb9bec2b2tpl/images: Add images.QR function git-subtree-dir: docs git-subtree-split:73a01565c5
997 B
997 B
title, description, categories, keywords, action
| title | description | categories | keywords | action | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| debug.Timer | Creates a named timer that reports elapsed time to the console. |
|
{{< new-in 0.120.0 >}}
Use the debug.Timer function to determine execution time for a block of code, useful for finding performance bottlenecks in templates.
The timer starts when you instantiate it, and stops when you call its Stop method.
{{ $t := debug.Timer "TestSqrt" }}
{{ range seq 2000 }}
{{ $f := math.Sqrt . }}
{{ end }}
{{ $t.Stop }}
Use the --logLevel info command line flag when you build the site.
hugo --logLevel info
The results are displayed in the console at the end of the build. You can have as many timers as you want and if you don't stop them, they will be stopped at the end of build.
INFO timer: name TestSqrt count 1002 duration 2.496017496s average 2.491035ms median 2.282291ms