I need to post SAS code on my website. However, if I do write my HTML to highlight SAS
cod it would take me a long time.
How can I transform the SAS code into nice looking HTML
counterpart?
I just discovered that Gist actually supports SAS Syntax highlighting!
This is what you see if you create a hello_world.sas
file on Gist.
If you'd like to embed SAS codes into (say) a Wordpress.org blog article (like myself), the way I usually do this is:
In your Wordpress.org website, already have the plugin oEmbed Gist already installed.
When you create a new blog post in Wordpress, in the body field (where you'd normally type out content of your blog post), simply copy and paste the Gist embedded link into the the body.
(alternatively, if you wish to write your Wordpress blog post normally, and embed multiple Gist SAS codes, just simply save the gist files as .sas
files (instead of one .md
file), and embed multiple embed URLs (corresponding to each code blogs).
More info see this stackoverflow forum - where I learnt about the awesome Gist and Wordpress Gist oEmbed combo!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With