-
-
Notifications
You must be signed in to change notification settings - Fork 45
Svelte Markdown example (Remark, Rehype, Svelte Components) #587
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
git-no
commented
Jun 8, 2025
Vite 6 is recommended
@git-no Can you add the pnpm-lock.yaml after a pnpm install?
⚠️ No Changeset found
Latest commit: e233a2c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
git-no
commented
Jun 8, 2025
@sdorra pnpm-lockfile is now integrated.
My build locally failed with
samples-arktype:build: sh: Zeile 1: content-collections: Kommando nicht gefunden. samples-xml:build: sh: Zeile 1: content-collections: Kommando nicht gefunden. samples-cli:build: sh: Zeile 1: content-collections: Kommando nicht gefunden. samples-arktype:build: ELIFECYCLE Command failed. samples-xml:build: ELIFECYCLE Command failed. samples-cli:build: ELIFECYCLE Command failed. samples-valibot:build: samples-valibot:build: > samples-valibot@0.1.0 build /Users/lukas/code/labs/svelte-content-collections/samples/valibot samples-valibot:build: > content-collections build samples-valibot:build: @content-collections/remix-vite:build: cache miss, executing 2d16bb4e9a8811e9 @content-collections/vinxi:build: cache miss, executing 29946ae7386e1a66 @content-collections/remix-vite:build: samples-valibot:build: sh: Zeile 1: content-collections: Kommando nicht gefunden. samples-valibot:build: ELIFECYCLE Command failed. @content-collections/vinxi:build: samples-xml:build: ERROR: command finished with error: command (/Users/lukas/code/labs/svelte-content-collections/samples/xml) /Users/lukas/Library/pnpm/.tools/pnpm/8.15.8/bin/pnpm run build exited (1) @content-collections/vinxi:build: @content-collections/remix-vite:build: samples-xml#build: command (/Users/lukas/code/labs/svelte-content-collections/samples/xml) Tasks: 8 successful, 15 total Cached: 0 cached, 15 total Time: 5.133s Failed: samples-xml#build ERROR run failed: command exited (1) ELIFECYCLE Command failed with exit code 1.
git-no
commented
Jun 9, 2025
@sdorra Are there any plans to update Vite to version 6 in the repository?
sdorra
commented
Jun 10, 2025
Are there any plans to update Vite to version 6 in the repository?
No concrete plans yet. Once I finish the work on #471 and then #494, I will make the long-overdue upgrades to Next and Vite. For Vite, we need to ensure compatibility with v5 and v6.
My build locally failed with
The problem is that these tests use the content-collections CLI, which must be built first. To test a fresh clone of content-collections, follow these steps:
# install dependencies pnpm install # build the cli pnpm build --filter=@content-collections/cli # ensure the cli is linked pnpm install # build all packages pnpm build # run the tests pnpm test
This should probably be in the README 🤔
sdorra
commented
Jun 10, 2025
The ci process still ends with the following error:
ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with samples/svelte-kit/package.jsonHave you done a pnpm install on the root of the monorepo?
samples/svelte-kit/package.json
Outdated
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.
Please keep the fixed versions. They have to be fixed because the samples must be openable in StackBlitz, and StackBlitz only looks at the folder of the sample, not the whole repo.
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.
no problem, I did rewrite these entries.
git-no
commented
Jun 12, 2025
@sdorra "Please keep the fixed versions. "
I do not get it? What do you like to have in package.json, my version or the previous version with Vite 5?
Just pnpm build did not work.
Building worked by following your steps.
But still pnpm test at the end fails.
sdorra
commented
Jun 12, 2025
You have changed the version of the @content-collections/* packages to workspace:*, which is incompatible with the sparse checkout of StackBlitz.
Please retain the old versions of the @content-collections/* packages. The other packages can be upgraded. After reverting the versions, run pnpm install on the root package.json of the monorepo, and then commit the package.json and pnpm-lock.yaml.
I am currently not at home and will return on Sunday. I will review the failing tests then.
sdorra
commented
Jun 15, 2025
I've added some styling and sample posts. I will update the tests tomorrow, and then we can merge the PR.
38e2f91 to
e233a2c
Compare
sdorra
commented
Jun 16, 2025
@git-no i've updated the sample to match the look and feel of the other (newer) samples. The build and the tests are working now. But i've noticed that every svelte component i've used inside markdown is wrapped in a p tag. Is there a way to get rid of the p?
git-no
commented
Jun 17, 2025
I will check next week.
git-no
commented
Jun 21, 2025
@sdorra
I can not reproduce the issue you mentioned. My tests worked as expected:
- A Svelte component within a text is included in the
<p>. - A Svelte component at line start is integrated without
<p>.
Do you have an example / repository?
sdorra
commented
Jun 22, 2025
Do you have an example / repository?
Yeah, this pull request. Each MD file uses a different Svelte component and all of them a wrapped with a p tag.
1e28b7f to
50aead7
Compare
eb76dde to
759321d
Compare
No description provided.