Closed IgnaceMaes closed 9 months ago
Name | Link |
---|---|
Latest commit | 9fa9c7f2eaa56b659fd87434b832e660a91d9ee0 |
Latest deploy log | https://app.netlify.com/sites/guidemaker-ember-template/deploys/65b17d1421ba0200084dbb03 |
Deploy Preview | https://deploy-preview-168--guidemaker-ember-template.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Also I'm a tiny bit concerned about this line https://github.com/IgnaceMaes/ember-showdown-shikiji/blob/main/ember-showdown-shikiji/src/initializers/showdown-shikiji.ts#L16
My understanding of our showdown implementation was that it was only including grammars for languages that we had specified (this assumption could be wrong though ðĪŠ). Shouldn't we only include a subset of languages that shikiji supports? How much of an impact on the bundle size does this change have?
One thing I notice is that we've lost support for the "ribbons" in the top of the examples ðĪ this is something that we explicitly had before to make sure that people knew what file type they were looking at quicker. Is this something that you could add to ember-showdown-shikiji?
Good point. I'll look into adding a way to indicate the language!
My understanding of our showdown implementation was that it was only including grammars for languages that we had specified (this assumption could be wrong though ðĪŠ). Shouldn't we only include a subset of languages that shikiji supports? How much of an impact on the bundle size does this change have?
I was under the impression all code examples were rendered via Fastboot so there was no client impact. But the library does probably get bundled to the client. I'll do some perf tests. But regardless, a good idea to include an option to specify which grammars should be loaded.
Concerning bundle sizes, I benchmarked the following:
So the vendor file size actually went down! And grammars are split into individual chunks. So this is actually an improvement ð
Added ribbons as well in ember-showdown-shikiji
v0.3.0.
Currently it's made as feature parity to highlight js
, ts
, and hbs
. Added gjs
and gts
as well already.
If desired, we can very easily extend this to other languages too as it's now implemented in pure CSS rather than SVG.
Switch to ember-showdown-shikiji for syntax highlighting.
.gjs
and.gts
highlightingPreview: https://deploy-preview-168--guidemaker-ember-template.netlify.app/release/examples/syntax-highlighting
Can only be released as major due to the manual Fastboot config requirement and Node minimum version bump.