You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seankhliao
changed the title
x/website,x/pkgsite: add support for syntax highligting
x/website,x/pkgsite: add support for syntax highlighting
Oct 6, 2022
II did a brief experiment to add syntax highlighting via https://github.com/yuin/goldmark-highlighting and it seems fairly easy to accomplish. Is this something the team is open to?
All that I think is required is a bit of configuration of goldmark-highlight and changing a given code block to have the language prefixed with language like you do in Github:
I think it would be pretty easy to progressively add this to pages in an incremental fashion until all properties have syntax highlighting. Is a PR welcome for this?
This is an umbrella issue for syntax highlighting support in various web properties owned and maintained by the Go project
example: https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#hdr-Objects
This can be tricky without a way to distinguish code blocks and pre-formatted non-code blocks.
examples:
- https://go.dev/doc/tutorial/database-access
- https://go.dev/doc/effective_go
Source of these pages are html or a simplified md files. https://cs.opensource.google/go/x/website/+/master:_content/doc/
examples:
- example code https://pkg.go.dev/io#example-Copy
See x/playground: support for syntax highlighting #34227 (comment) for context.
The text was updated successfully, but these errors were encountered: