Skip to content

Stale _site/ from 2024-12-11 is committed to main while docs/ (the real output dir) is gitignored #114

Description

@d-morrison

Summary

28 files under _site/ are committed to main and are not gitignored, while docs/ --- the directory _quarto.yml actually renders into --- is gitignored. So the repo tracks stale build output and ignores the real build output, exactly backwards.

Verified on a clean worktree off origin/main (63648a2):

$ git ls-files _site | wc -l
28
$ git log -1 --format='%h %ci %s' -- _site
a8eb6c8 2024-12-11 20:34:18 -0800 more
$ git check-ignore -v _site
(no output -- not ignored)
$ grep -n 'docs' .gitignore
6:docs/

The tracked copy is from 2024-12-11, roughly twenty months out of date. It contains index.html, listings.json, papers/listing.html, and a set of people/*/ images, none of which reflect the current site.

Why this is worth fixing rather than ignoring

On its own this is untidy: dead files, and a diff that occasionally shows build output. That alone would not justify an issue.

What makes it worth filing is that it converts a loud failure into a silent wrong one in the preview migration tracked by #102. Morrison-Lab/gha's preview.yml renders according to _quarto.yml (so, into docs/) but stages its artifact from a hardcoded _site/. With no _site/ present that mismatch fails immediately at ls _site/. With this stale _site/ present it passes, and the PR preview publishes the 2024 site.

That gap is filed upstream as Morrison-Lab/gha#608 and is the primary blocker on #102. Deleting the tracked _site/ does not fix that gap --- it fixes the part where the gap is invisible. Both are worth doing, and this one is entirely within this repo.

What to do

  1. git rm -r --cached _site and commit the deletion.
  2. Add _site/ to .gitignore, next to the existing docs/ entry, so a local render with the default output directory does not re-add it.
  3. Confirm nothing references _site/ --- notably publish.yml's folder: docs/ and preview.yml's source-dir: ./docs/, both of which already point at docs/ and so are unaffected.

Scope

Small and self-contained; no dependency on #102 or #103, and worth landing whether or not either migration proceeds.

Activity

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