Skip to content

v2.29.0

Latest

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 28 Nov 02:52

SingleFile CLI 2.29.0

New features

  • New option --apply-print-stylesheets: the page is saved as it would be printed. The saved page shows on screen the layout its site provides for printing, which on many article sites is the text without the navigation and the ads. The elements that are not displayed are kept, because the print layout may show them, so the saved page can be larger. The rules that depend on the size of the page are still evaluated for the window, not for a sheet of paper (gildas-lormeau/SingleFile#1567).

    single-file https://www.example.com page.html --apply-print-stylesheets
    
  • New options --accept-header-video and --accept-header-audio: they set the Accept header sent when the tool fetches the video and audio files of a page, as the existing --accept-header-* options do for the other kinds of resources.

CLI fixes and improvements

  • Updated single-file-core to 1.17.2:
    • an @namespace rule of a stylesheet loaded with @import no longer applies to the rules of the stylesheet that imports it, and the @namespace rule of a stylesheet is no longer ignored when the rules of an imported stylesheet are written before it. The pages saved as ZIP files and the stylesheets without @namespace rule are not concerned (gildas-lormeau/SingleFile#1513)
  • eslint is updated in the lockfile, which resolves the advisory GHSA-g3hv-75wg-m249 on minimatch. It is a development dependency, the published package is not concerned.

Co-authored by Claude (Claude Code)