6/08/2017 07:13:00 AM
There is some way to do that,
Quick
You can use online syntax highlighter, just copy your script want to format on online syntax highlighters like https://tohtml.com, http://hilite.me, http://markup.su/highlighter or any other tool and then re-copas (copy-paste) on your blog. You can use it as simply.
Linked
Yes, by embed! Usually, i used https://gist.github.com and https://pastebin.com.
Builtin
This is clear one explanation included screenshot you can follow as easily. http://oneqonea.blogspot.co.id/2012/04/how-do-i-add-syntax-highlighting-to-my.html
Conclusion
Choose what do you want, all its ok. Mine used Builtin and sometimes use Linked/Embed to share blog backlink haha!. If you use built in, its base on JavaScript, called on external sources. The most issue part about js is where you put your js codes, but I think it depends on your website or app. Some web apps are based on JavaScript. Then it does not make sense to include it at the bottom of the page mean before </body> tag to get load page faster but in this case, you need load it immediately.
If JavaScript just adds some not so important features to some an another content-based page or any async task, then better load it at the end. I think it just little bit different, loading time will almost be the same, but the user will see the important parts earlier (before the page finished loading). It’s not about a whole site loading faster, but giving a user the impression of some website loading faster.
Syntax Highlighter on Blogger
Quick
You can use online syntax highlighter, just copy your script want to format on online syntax highlighters like https://tohtml.com, http://hilite.me, http://markup.su/highlighter or any other tool and then re-copas (copy-paste) on your blog. You can use it as simply.
Linked
Yes, by embed! Usually, i used https://gist.github.com and https://pastebin.com.
Builtin
This is clear one explanation included screenshot you can follow as easily. http://oneqonea.blogspot.co.id/2012/04/how-do-i-add-syntax-highlighting-to-my.html
Conclusion
Choose what do you want, all its ok. Mine used Builtin and sometimes use Linked/Embed to share blog backlink haha!. If you use built in, its base on JavaScript, called on external sources. The most issue part about js is where you put your js codes, but I think it depends on your website or app. Some web apps are based on JavaScript. Then it does not make sense to include it at the bottom of the page mean before </body> tag to get load page faster but in this case, you need load it immediately.
If JavaScript just adds some not so important features to some an another content-based page or any async task, then better load it at the end. I think it just little bit different, loading time will almost be the same, but the user will see the important parts earlier (before the page finished loading). It’s not about a whole site loading faster, but giving a user the impression of some website loading faster.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment