Skip to content

🏗️ post-processing of all assets #1548

Closed

Description

@DerekNonGeneric

🐛 Bug report

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

This is not a super-high priority, but we recently removed the compress template and would like to do post-processing of all assets that could benefit from it. This is a memo.


  • I would like to work on this issue and submit a pull request.

Activity

  1. DerekNonGeneric commented on Apr 27, 2024

    @DerekNonGeneric
    MemberAuthor
  2. transferred this issue fromon Jan 10, 2025
  3. DerekNonGeneric commented on Aug 26, 2026

    @DerekNonGeneric
    MemberAuthor

    Every asset that could benefit now is post-processed, in the build that
    publishes only.

    how landed
    HTML html-minifier-terser #1862
    SVG svgo, inlined marks and files alike #1863
    CSS cssnano before this
    JS terser, keeping the license notice #1867, named in #1868
    HTML   321,039 -> 236,141   (26.4%)
    SVG     31,072 ->  24,850   (20.0%)
    JS       9,213 ->   5,774   (37.3%)
    

    The sources are untouched throughout: a mark keeps its file header and
    its line breaks, and the vendored counter stays byte for byte what
    upstream serves, which is what lets #1865 tell whether it has fallen
    behind.

    Two things came out of this that are worth knowing:

    • Inline marks are two in five bytes of a built page, and the HTML
      minifier does not read inside one. They come from three places —
      {% include %}, written into a template, and emitted by
      markdown-it-github-alerts — which is why the pass reads the output
      rather than the includes.
    • Minifying a redistributed file strips its terms unless told not to.
      The counter is ISC, which asks for the notice in every copy.

    This did not close on its own, though #1867 carries Fixes: and GitHub
    records the link. Nothing in this repository has ever closed that way —
    every issue is closed by hand, which is worth a look at what the
    landing app is allowed to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions