-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update git.md (“Hosting Considerations”) #2074
Conversation
Adds details related to obtaining accurate `.GitInfo` data when using hosts’ native interfaces. Information accurate as of 2022-05-08.
One correction to that. The closing command (in the code example) should, of course, be: git fetch --unshallow && hugo --minify |
Suggested changes per @jmooring comment.
@jmooring Have edited the file to that effect. Not sure if it'll appear in what you can see. If not, let me know and I'll do a fresh PR with the changes, which amount to the following, below. N.B.: I didn't put in the "Configurable" column because it seemed unnecessary for what I ended up doing. Hosting ConsiderationsOn the site host, your repository must be "deep-cloned," so the returned
Footnotes
|
The idea behind the "configurable" green check mark is... yeah, the default for x is shallow, but that's not a problem, and here's why (footnote). With GitHub Pages, if you use https://github.com/actions/checkout#checkout-v3, the default is shallow, not deep. The example workflow in our documentation sets the fetch depth. Maybe you want to point to that. The GitLab example in our documentation includes the depth setting, so you might want to point to that as well. |
Further changes (including re-adding "Configurable" column and providing more info and links) per @jmooring.
@jmooring Have edited as per your last comment. (...except I forgot the GitLab example link; will make shortly. Trying to do two things at once. Sorry.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last change...
content/en/variables/git.md
Outdated
|
||
[^CFP]: To configure a Cloudflare Pages site for deep cloning, preface the site's normal Hugo build command with `git fetch --unshallow &&` (*e.g.*, `git fetch --unshallow && hugo`). | ||
|
||
[^GHP]: You can configure the GitHub Runner to do a deep clone by specifying `fetch-depth: 0` in the applicable "checkout" step of your workflow file, as shown in the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-github/#procedure). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[^GHP]: You can configure the GitHub Runner to do a deep clone by specifying `fetch-depth: 0` in the applicable "checkout" step of your workflow file, as shown in the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-github/#procedure). | |
[^GHP]: You can configure the GitHub Action to do a deep clone by specifying `fetch-depth: 0` in the applicable "checkout" step of your workflow file, as shown in the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-github/#procedure). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the change directly in the file rather than accepting the suggestion because I still needed to add the GL-related Hugo link you mentioned earlier. Done.
Further changes (incl. one forgotten from previous comment) per @jmooring.
This is great; thanks. Sorry it took me a while to get to it. |
Sorry it took me so many iterations to give you what you wanted! 😄 |
Adds details related to obtaining accurate
.GitInfo
data when using hosts’ native interfaces. Information accurate as of 2022-05-08.