1. 20 10月, 2021 1 次提交
  2. 19 10月, 2021 5 次提交
  3. 18 10月, 2021 3 次提交
  4. 17 10月, 2021 1 次提交
  5. 16 10月, 2021 1 次提交
    • B
      Reimplement archetypes · 9185e11e
      Bjørn Erik Pedersen 提交于
      The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.
      
      This new implementation is using the exact same code path for evaluating the pages as in a regular build.
      
      This also makes it more robust and easier to reason about in a multilingual setup.
      
      Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:
      
      ```bash
      hugo new content/en/posts/my-first-post.md
      ```
      
      Fixes #9032
      Fixes #7589
      Fixes #9043
      Fixes #9046
      Fixes #9047
      9185e11e
  6. 14 10月, 2021 2 次提交
  7. 12 10月, 2021 1 次提交
    • I
      releaser: Fix regexp · d7331aaa
      Iskander (Alex) Sharipov 提交于
      Original regexp used a char class which caused the regexp to only
      check 1 symbol instead of a substring like "See" and "Closes".
      So it would match `e #x` instead of `See #x` and many other
      weird combinations.
      
      Tests were passing as they never checked against an input that
      would confuse that regexp.
      
      Found with go-critic static analyzer, `badRegexp` checker.
      d7331aaa
  8. 11 10月, 2021 2 次提交
  9. 10 10月, 2021 5 次提交
  10. 05 10月, 2021 2 次提交
  11. 23 9月, 2021 4 次提交
    • D
      Revert "Remove credit from release notes" · fab1e43d
      digitalcraftsman 提交于
      See b2eaf4c8
      fab1e43d
    • P
      Pass minification errors to the user · e03f82ee
      Paul Gottschling 提交于
      Previously, *minifyTransformation.Transform suppressed the
      error returned by t.m.Minify. This meant that when minification
      returned an error, the error would not reach the user. Instead,
      minification would silently fail. For example, if a JavaScript
      file included a call to the Date constructor with:
      
      new Date(2020, 04, 02)
      
      The package that the minification library uses to parse JS files,
      github.com/tdewolff/parse would return an error, since "04" would
      be parsed as a legacy octal. However, the JS file would remain
      un-minified with no error.
      
      Fixing this is not as simple as replacing "_" with an "err" in
      *minifyTransformation.Transform, however (though this is
      necessary). If we only returned this error from Transform,
      then hugolib.TestResourceMinifyDisabled would fail. Instead of
      being a no-op, as TestResourceMinifyDisabled expects, using the
      "minify" template function with a "disableXML=true" config
      setting instead returns the error, "minifier does not exist for
      mimetype."
      
      The "minifier does not exist" error is returned because of the
      way minifiers.New works. If the user's config disables
      minification for a particular MIME type, minifiers.New does
      not add it to the resulting Client's *minify.M. However, this
      also means that when the "minify" template function is executed,
       a *resourceAdapter's transformations still add a minification.
      When it comes time to call the minify.Minifier for a specific
      MIME type via *M.MinifyMimetype, the github.com/tdewolff/minify
      library throws the "does not exist" error for the missing MIME
      type.
      
      The solution was to change minifiers.New so, instead of skipping
      a minifier for each disabled MIME type, it adds  a NoOpMinifier,
      which simply copies the source to the destination without
      minification. This means that when the "minify" template
      function is used for a particular resource, and that resource's
      MIME type has minification disabled, minification is genuinely
      skipped, and does not result in an error.
      
      In order to add this, I've fixed a possibly unwanted interaction
      between minifiers.TestConfigureMinify and
      hugolib.TestResourceMinifyDisabled. The latter disables
      minification and expects minification to be a no-op. The former
      disables minification and expects it to result in an error. The
      only reason hugolib.TestResourceMinifyDisabled passes in the
      original code is that the "does not exist" error is suppressed.
      However, we shouldn't suppress minification errors, since they
      can leave users perplexed. I've changed the test assertion in
      minifiers.TestConfigureMinify to expect no errors and a no-op
      if minification is disabled for a particular MIME type.
      
      Fixes #8954
      e03f82ee
    • P
      Clarify "precision" in currency format functions · a864ffe9
      Paul Gottschling 提交于
      The documentation of the FormatAccounting and FormatCurrency
      functions could be clearer in terms of how the precision param
      works. This commit makes it more explicit that adding a precision
      of < 2 will not format the return values to include fewer decimals.
      
      Resolves #8858
      a864ffe9
    • D
      build(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.29 · b49da332
      dependabot[bot] 提交于
      Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.24 to 0.12.29.
      - [Release notes](https://github.com/evanw/esbuild/releases)
      - [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
      - [Commits](https://github.com/evanw/esbuild/compare/v0.12.24...v0.12.29)
      
      ---
      updated-dependencies:
      - dependency-name: github.com/evanw/esbuild
        dependency-type: direct:production
        update-type: version-update:semver-patch
      ...
      Signed-off-by: Ndependabot[bot] <support@github.com>
      b49da332
  12. 19 9月, 2021 1 次提交
  13. 17 9月, 2021 2 次提交
  14. 13 9月, 2021 1 次提交
  15. 04 9月, 2021 5 次提交
  16. 02 9月, 2021 4 次提交