Skip to content
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

Adapt GitHub file path #91

Merged
merged 1 commit into from
May 30, 2024
Merged

Adapt GitHub file path #91

merged 1 commit into from
May 30, 2024

Conversation

remibetin
Copy link
Member

@remibetin remibetin commented May 27, 2024

For the "Fork & Edit" link, the path to the file in GitHub is constructed as follows: https://github.com/{{repo}}/edit/{{branch}}/{{path}}

This PR clarifies what is assigned to path depending on the situation:

  • By default, path = path to the file from the root of the Jekyll project.
  • If the page is part of a collection AND the repository is w3c/wai-website, we add collections/ before the path to the file. Indeed, all collections are stored in a collections/ folder in this repo.
  • If a github.path attribute has been manually set in the frontmatter of the page, it is used in priority.

Copy link

netlify bot commented May 27, 2024

Deploy Preview for wai-website-theme ready!

Name Link
🔨 Latest commit d87a12a
🔍 Latest deploy log https://app.netlify.com/sites/wai-website-theme/deploys/6654b9dc1f2c050008371fd8
😎 Deploy Preview https://deploy-preview-91--wai-website-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@remibetin remibetin marked this pull request as ready for review May 28, 2024 10:02
@remibetin remibetin merged commit fdbafce into master May 30, 2024
5 checks passed
@remibetin remibetin deleted the github-file-path branch May 30, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant