Have a remark plugin fetch the actual code block content at build time instead of browse time (may make the build process longer and less reliable?).
This could be a theme options as some people might want to be able to fetch latest code examples from GitHub.