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

Can symlinks point to files/folders outside of docs/ when docs/ is the site root? #12

Open
1j01 opened this issue Apr 18, 2024 · 0 comments

Comments

@1j01
Copy link

1j01 commented Apr 18, 2024

This would be very useful for websites demonstrating a library by including it in a page, without having to store build artifacts in the repo (or copy source code), or keeping a messy repository structure.

Answer: no.

Perhaps they only check out a subtree of the repository in this case, for performance, or perhaps they limit the symlinks for security, without consideration for these use cases.

Workarounds:

  • Keep all website files at the root of the repository.
    • Library code must work without a compilation step.
    • Messy repository structure.
    • Unnecessary files will be deployed.
    • Maintains the simplicity/ergonomics of pushing to deploy.
  • Use the gh-pages npm package to copy everything needed for deployment to a separate branch, and configure that branch as the GitHub Pages source.
    • Supports build artifacts / compilation.
    • Clean/flexible repository structure.
    • Control over exact files to be deployed.
    • Requires additional setup for GitHub Actions to restore the ergonomics of pushing to deploy.
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

No branches or pull requests

1 participant