Open zillionare opened 2 months ago
confirmed run the slide without npx lead to same:
npm run dev -- ~/workspace/issue/project/slides.md -t ~/workspace/issue/slidev_themes/themes/landscape-jade/
if I move slidev_themes/components, package.json and project/slides.md,..etc into themes/landscape-jade, it will all work (but without specify theme. If I did, it will complain that route is not found)
I am an online course teacher. In different courses and scenarios (exercise, promotion, main course, etc), I need to use different themes, but I will always use the same components.
To ensure version consistency, I want these customized components to be in a single place rather than having multiple copies scattered across different themes.
I don't want to manage the slides and Slidev files in the same directory. Both the slides and Slidev files will be backed up using GitHub, but I need to put them in different repositories (the slides are private, but the Slidev themes are open source – because Slidev is open source).
ln -s ~/workspace/issue/project/slides.md ./slides.md
ln -s ~/workspace/issue/project/pages ./pages
And keep components still copied into landscape_jade, this works.
ln -s ~/workspace/issue/slidev_themes/components ./components
this will work too.
Therefore, before running a specific slide, I just need to create some symbolic links. The only inconvenience is that I have about 10 themes (most of which are meaningless experiments), and now these themes will unnecessarily install node_modules 10 times. However, this is not a major issue.
By the way, Slidev is an excellent project, and I really love it. I have even tried writing themes for it and released them. Later, I realized that I was doing some things that Slidev had already done, and I wasn’t doing them as well. Additionally, I used syntax that conflicts with Slidev. It seems that I am not yet ready to release my own themes. My themes might not help others and could instead waste their time.
Describe the bug
see https://github.com/slidevjs/slidev/discussions/1863#discussioncomment-10613408
Minimal reproduction
attached please find a reproducible example.
after decompressed, cd to root/project, then run
this will install node_module and launch the site. You'll find a workable version, like this:
then stop it, perform the following actions:
you'll find cannot resolve custom component in develop pane. custom-component-resolve-issue.tar.gz
before compressing, I've removed .git and styles/fonts folder, this should have no side effect.
Environment
If you are using Slidev globally (i.e.
npx slidev
ornpm i -g slidev
), please try to reproduce the issue in a local project (i.e.npm create slidev@latest
).