Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
.gitignore
LICENSE
README.md
_hilang_setup.Rmd
header.html
rmarkdown-with-alt-langs.Rmd
rmarkdown-with-alt-langs.Rproj
rmarkdown-with-alt-langs.html

README.md

rmarkdown-with-alt-langs

Example of an html document with syntax highlighting not supported natively by R Markdown (SAS & Crystal).

For a full description of how this is accomplished and stitched together, refer to my blog post.


Github Pages + Post Commit Hook

For future reference, this makes use of a super simple post-commit hook for git that copies the html document into the docs folder so that it can be viewed on Github Pages — https://curtisalexander.github.io/rmarkdown-with-alt-langs/.

Create the file .git/hooks/post-commit with the following.

#!/bin/sh

cp rmarkdown-with-alt-langs.html docs/index.html
git add docs/index.html
git commit -m "$(git log -1 master --pretty=%B)"
You can’t perform that action at this time.