Skip to content

Respect symlinks in _static Asset Handling #13734

@Praecordi

Description

@Praecordi

Is your feature request related to a problem? Please describe.
For particularly large project with many resource files, maintaining assets is a waste of disk space and prolongs build times.

Describe the solution you'd like
I have two proposed solutions:

  1. A configuration option called html_use_symlink = True to symlink _static -> build/html/_static instead of copying
  2. A configuration option called html_respect_symlink to copy the _static directory while preserving symlinks (i.e. cp -P behavior)

Describe alternatives you've considered

  • Manual symlink files - error prone and tedious
  • Overriding copy_static_files() or copy_asset_file() or copy_asset() - fragile

Some cons to the symlink approach is compatibility with Windows, hence the flags which can allow a user to turn off symlinks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions