Add an option to keep the symlinks #4115
Replies: 3 comments
-
|
This doesn't address symlinks, but this link/config might be useful: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix since it discusses deploying to GitHub Pages specifically:
Basically you could dynamically set the "build:dev": "npx @11ty/eleventy",
"build:prod": "npx @11ty/eleventy --pathprefix=MY_PROJECT",
...Where the trick is that you'd need to be sure to use the |
Beta Was this translation helpful? Give feedback.
-
|
Ah, I think there is a trick to doing symlinks, https://www.11ty.dev/docs/copy/#advanced-options
Where the latest versions of npm info @11ty/eleventy dist-tags --json
{
"latest": "1.0.2",
"beta": "1.0.0-beta.10",
"canary": "2.0.0-canary.15"
}And you can install the "canary" v2 version using npm i @11ty/eleventy@canary -D. UPDATE: I'm also reminded of the new HTML
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the {
"scripts": {
"docs:build": "eleventy",
"docs:serve": "eleventy --serve"
}
}And execute this command in GitHub Actions: npm run docs:build -- --pathprefix=MY_PROJECTI tested with the canary version and the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
The symlinks are not kept. They are replaced by the pointed file / directory.
Describe the solution you'd like
Add an option to
eleventyConfig.addPassthroughCopy()to keep the links.Additional context
I want to use elevent to deploy a site on GitHub Pages. But the beginning of the URL is different in local and in production:
I want to use the
/MY-PROJECT/foo/baz/URL in the layout. So I created theMY-PROJECTsymlink that goes back to the root:foo/bar.mdMY-PROJECT->.I expect to have in
_site:foo/bar/index.htmlMY-PROJECT->.Beta Was this translation helpful? Give feedback.
All reactions