Skip to content

Feature request: garbage collection / dead file detection #191

@jameshfisher

Description

@jameshfisher

I recently wanted to detect and clear out all the old files in my static site. I did this by

  1. running hyperlink
  2. munging its text output to get a list of files accessible from the roots
  3. using find to list all files in my static site
  4. using diff to list those files in my static site that are not accessible from the roots
  5. deleting those files

Hyperlink was very useful here, but I think it would be cool if the feature was built in, or if there was a good example in the README for how to do this with hyperlink. Ultimately I'd like to have this test in my CI to ensure I keep the site clean.

(Not posting my script here because it's awful messy, mostly due to scraping hyperlink's stdout!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions