github / github/pages-gem

Need to show a warning if Git LFS is used

Offen
#515 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Ruby
Sterne
1.9k
Forks
360
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Before submitting an issue, please be sure to

- [x] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/.github/CONTRIBUTING.md#contributing-to-the-github-pages-gem)
- [x] Update to the latest Gem version (run `bundle update github-pages`)

### This issue affects

- [ ] The site generated by GitHub Pages
- [x] Building sites locally

### What did you do (e.g., steps to reproduce)

1. `jekyll new .`
1. `git init .`
1. `git lfs install`
1. `mkdir big-user-content && cd big-user-content`
1. `git lfs track '*.png'`
1. `git lfs track '*.jpg'`
1. `git lfs track '*.gif'`
1. `cd ..`
1. add content...
1. `bundle exec jekyll serve` - testing site - **Ok**.
1. `git add .`
1. `git commit -m "Hello world"`
1. `bundle exec jekyll serve` - testing site, again - **Ok**.
1. `git remote add origin https://github.com/:user/:repo.git`
1. `git push --all -u origin`
1. open `https://:user.github.io/:repo/` site -> **Woops, where is my images?**
1. googling:
- git-lfs/git-lfs#791
- git-lfs/git-lfs#1342
1. recreate the repo...

### What did you expect to happen?

1. `jekyll new .`
1. `git init .`
1. `git lfs install`
1. `mkdir big-user-content && cd big-user-content`
1. `git lfs track '*.png'`
1. `git lfs track '*.jpg'`
1. `git lfs track '*.gif'`
1. `cd ..`
1. add content...
1. `bundle exec jekyll serve` - testing site - **Warning!**.

### What happened instead?

See "steps to reproduce".

### Solutions

- [fast] check if `.git/lfs` directory is exist and not empty
- [proper] parse `git lfs track` and `git lfs ls-files` output

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere das gemeldete Verhalten mit `bundle exec jekyll serve`, nachdem du Bilddateien mit Git LFS versioniert hast, und untersuche anschließend den lokalen Jekyll-Build-Pfad, der von den pages-gem-Abhängigkeiten verwendet wird. Die Aufgabe ist erledigt, wenn ein lokaler Build warnt, sobald Git-LFS-Inhalte vorhanden sind, anstatt stillschweigend fehlende Bilder zu erzeugen; im Issue werden das Prüfen von `.git/lfs` oder das Parsen der Git-LFS-Ausgabe als mögliche Ansätze aufgeführt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, ruby
Bereich
build-system
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.