GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Hello, following my comment on StackOverflow, I'm posting my question here :
My blog is there : http://aarails.com
Is there a way to "prettify" code on the index page? For some reason, the markdown JS code isn't included on this page. But everything works fine on the article page.
Is there maybe a wordpress filter I can add to the plugin code to make it include the markdown JS on this page too?
Any help is appreciated, thanks!
Also on the board on this one.
Would be outstanding if it could display highlighted code on the homepage.
Did a small hack.
In wp-markdown.php, function loadPrettify(),
add || is_home() after return is_singular($savedtypes), like this:
// ...... existing code
return is_singular($savedtypes) || is_home();
By doing this, prettify.js will be also loaded on "home page" so that the code block will get formatted by prettify.js.
Maybe there should be an option in the settings to enable people who want this to get this function.
As requested here and in http://wordpress.org/support/topic/prettify-code-not-working-in-some-views - I'm marking this for 1.2 (next release).
On a completely unrelated note, what are people's opinions on #5 ?
Sorry for the wait on this one. This is finally fixed with f8acd3e - I will leave it a bit before pushing to the WP repository so that any bugs came be spotted and fixed before then. Feel free to test it!