Closed campoy closed 6 years ago
Previously we were using the triple backtick to indicate code, copy pasting code into the post.
As @dpordomingo proposed I created a new short-code named code which given the highlighting language.
code
So we can replace sections like this one:
which is rendered as:
With a simple short code call:
{{% code "/post/c-on-bigquery/udf.js" javascript %}}
Which displays as:
Note that the parameters are positional and the highlight language is optional.
@campoy Looks like this one https://stackoverflow.com/a/45421343
yeah, but that doesn't exist on our theme. LGTM?
Happy to change it later if we see any way to improve the short code.
Thanks for adding it :)
Previously we were using the triple backtick to indicate code, copy pasting code into the post.
As @dpordomingo proposed I created a new short-code named
code
which given the highlighting language.So we can replace sections like this one:
which is rendered as:
With a simple short code call:
Which displays as:
Note that the parameters are positional and the highlight language is optional.