Skip to content

Conversation

@jacobsorme
Copy link
Contributor

Summary

Improve docs for embed files code fragment.

Related issue, if any:

#2626

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

  • Yes
  • No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@vercel
Copy link

vercel bot commented Dec 16, 2025

@jacobsorme is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

@jacobsorme
Copy link
Contributor Author

@trusktr Added example (kinda), do you think we need a full example for the :omitFragmentLine? My thoughts was to avoid having the section grow too long

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docsify-preview Ready Ready Preview, Comment Dec 17, 2025 2:06am

Copy link
Collaborator

@paulhibbitts paulhibbitts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @jacobsorme ! I've tested the PR build in codesandbox and it looks to work as described:

https://codesandbox.io/p/devbox/admiring-yonath-qgtfp5?workspaceId=ws_C7CBq2TzamwfU438Zxccyc

I think it would be clearer in the docs to display the file contents on the same page before the embedded fragment:
https://qgtfp5.csb.app/#/fragment-embed

What do you think?

@jacobsorme
Copy link
Contributor Author

Good idea I completely agree! Willfix

@jacobsorme
Copy link
Contributor Author

image New look! First the whole file, and then just below with the `:fragment=demo`

@paulhibbitts
Copy link
Collaborator

That looks good @jacobsorme , but do you know why an updated Preview is not available?

@jacobsorme
Copy link
Contributor Author

Hmm, the Vercel bot preview? Not sure, but noticed in other PRs it seems to run only once. Maybe we can trigger it to run again here somehow? @vercel plz

@paulhibbitts
Copy link
Collaborator

paulhibbitts commented Dec 20, 2025

Thanks @jacobsorme! I wanted to confirm that the actual preview does match your screenshot?
If the emoji down-arrow is in the final docs, I'd suggest removing it. Emojis used as the sole representation of meaning aren't very accessible and aren't used that way elsewhere in the Docsify documentation.

Otherwise this looks good! Once we see another preview, we should be ready for approval.

@jacobsorme
Copy link
Contributor Author

Aight sure, makes sense. I'm pretty sure I've seen that emoji arrow in other places though, but that's for a separate discussion I guess - removing here!

Wasn't completely sure how to best introduce the example to the reader either. Went for

Example: The file ...

Thought about this one also

Example: The file ...

@jacobsorme
Copy link
Contributor Author

@paulhibbitts Possible to trigger a re-Preview from here? https://github.com/docsifyjs/docsify/deployments/Preview

@paulhibbitts
Copy link
Collaborator

paulhibbitts commented Dec 20, 2025

How about something like this @jacobsorme?

Example: In the source file _media/example.js, /// [demo] identifiers have been included:

Just trying to fit it in a bit better with the overall style of the other items on the same page. I was able to build that test based on your docs too so that is a good sign 🙂

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.

2 participants