Kan Zhang 11 Years Ago Any one know how to use Gist in blog? I have read James Falkner's blog about how to use Gist:---------------You can include gists (code snippets) using the 'Embed' option, and cutting/pasting the necessary javascript. This is the only kind of js allowed in your blog. ---------------But I didn't find 'Embed' option in the editor.... Please sign in to reply. Reply as... Cancel James Falkner Kan Zhang 11 Years Ago Kan - go to gist.github.com, cut/paste your code, click 'Create Public Gist', then you will see a 'Embed this Gist' option on the left, simply cut and paste the code (it starts with a <script> tag) into your Liferay blog, by first switching to the "Source" view of your blog (click the "Source" button), cut and paste, then switch back and beautify Please sign in to reply. Reply as... Cancel Kan Zhang James Falkner 11 Years Ago Thanks James! Please sign in to reply. Reply as... Cancel Kan Zhang James Falkner 11 Years Ago - Edited James - Looks like all the indents in Gist are not displaying properly because of the following CSS on liferay site:pre { white-space: pre-line;}-------Fixed by inserting the following CSS in "Source" view:<style type="text/css">pre { white-space: pre !important;}</style> Please sign in to reply. Reply as... Cancel
James Falkner Kan Zhang 11 Years Ago Kan - go to gist.github.com, cut/paste your code, click 'Create Public Gist', then you will see a 'Embed this Gist' option on the left, simply cut and paste the code (it starts with a <script> tag) into your Liferay blog, by first switching to the "Source" view of your blog (click the "Source" button), cut and paste, then switch back and beautify Please sign in to reply. Reply as... Cancel Kan Zhang James Falkner 11 Years Ago Thanks James! Please sign in to reply. Reply as... Cancel Kan Zhang James Falkner 11 Years Ago - Edited James - Looks like all the indents in Gist are not displaying properly because of the following CSS on liferay site:pre { white-space: pre-line;}-------Fixed by inserting the following CSS in "Source" view:<style type="text/css">pre { white-space: pre !important;}</style> Please sign in to reply. Reply as... Cancel
Kan Zhang James Falkner 11 Years Ago - Edited James - Looks like all the indents in Gist are not displaying properly because of the following CSS on liferay site:pre { white-space: pre-line;}-------Fixed by inserting the following CSS in "Source" view:<style type="text/css">pre { white-space: pre !important;}</style> Please sign in to reply. Reply as... Cancel