Skip to content
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

Investigate adding markup/markdown styling to VADS for code snippets #185

Closed
1 task
Tracked by #180 ...
msbtterswrth opened this issue Nov 4, 2024 · 4 comments
Closed
1 task
Tracked by #180 ...
Assignees

Comments

@msbtterswrth
Copy link
Collaborator

msbtterswrth commented Nov 4, 2024

Background

As we updated our VADS page with code examples, we noticed that there wasn't much visually distinguishing it from regular text.

Image

After discussing this with the design system folks we have the go ahead to investigate adding some kind of codeblock styling similar to something like this.

Image

There may be a way to add markdown or syntax styling into the jekyll templates or we may need to roll our own, let's investigate.

ACs

  • Codeblocks can be styled in VADS pages
@adamwhitlock1
Copy link
Collaborator

adamwhitlock1 commented Nov 4, 2024

Configuring syntax highlighting within markdown and Jekyll looks to be relatively painless by using Coderay

Coderay would be the most universal way to go about it because then any markdown that uses code blocks would be styled 'automatically'. Alternatively there is also a way to use Rouge but that requires code blocks to be surrounded by a specific liquid tag:

{% highlight ruby %}
def foo
  puts 'foo'
end
{% endhighlight %}

We will also need to figure out the best styling / theme to use for our code block sections.

@msbtterswrth
Copy link
Collaborator Author

Sounds excellent, any suggestions on themes? Is there a place I could see examples? ( i didn't see any in the first docs for kramdown, but i could've missed them)

@adamwhitlock1
Copy link
Collaborator

@msbtterswrth
Copy link
Collaborator Author

This is amazing!! Excellent work!

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

No branches or pull requests

3 participants