Hi,
I was thinking of starting blog and was looking for advice.
I was hoping to get one where it was easy to mark source code - such as it is in this very good web forum and also one that it was possible to embed javascript into my posts.
Works in two modes: Either by "full" JavaScript where you can just paste the sourcecode into script tags or in a highlight mode where you have to do the HTML escaping (for < and the others). I use the first one, has the disadvantage that the source does not appear in the RSS feed. The script allows easy highlighting of selected lines.
You can integrate it easily where you are allowed to include external JavaScript.
Works in two modes: Either by "full" JavaScript where you can just paste the sourcecode into script tags or in a highlight mode where you have to do the HTML escaping (for < and the others). I use the first one, has the disadvantage that the source does not appear in the RSS feed. The script allows easy highlighting of selected lines.
You can integrate it easily where you are allowed to include external JavaScript.
Do you use free hosting with wordpress or bloggspot? And if so how do you integrate Alexy Gorbatchev stuff in with it?
The problem is that most free blogs (wordpress, bloggspot) don't give tha ability to have your own folders where you can neatly store your javascript.
This will mean you end up with some remote calls to Alex's utilities.
does anyone know of some free blogging software where you can have your own folders?
Thanks
Hauke Ingmar Schmidt
Rancher
Joined: Nov 18, 2008
Posts: 370
posted
1
Why do you want to store the Javascript locally?
With Blogspot/Blogger you can add a HTML/Javascript block to your layout and enter:
In your post you can then:
That's all you need to do.
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 295
posted
0
Hauke Ingmar Schmidt wrote:Why do you want to store the Javascript locally?
With Blogspot/Blogger you can add a HTML/Javascript block to your layout and enter:
In your post you can then:
That's all you need to do.
I'm afaird my javascript / blog knowledge isn't that good, so you're going to have to be patient with me :-)
When you said "... add to your layout" or yuo saying have to add this to every single post or something that is in the template?
Many many thanks!
Hauke Ingmar Schmidt
Rancher
Joined: Nov 18, 2008
Posts: 370
posted
1
No, it is a one-time thing. With Blogspot you (can) compose your page design by dragging boxes to slots (e.g. Header, Archive, Attribution, Blog posts...). These are rendered on every page. One type of box is simply HTML/Javascript where you can enter code at your own.
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 295
posted
0
Hauke Ingmar Schmidt wrote:No, it is a one-time thing. With Blogspot you (can) compose your page design by dragging boxes to slots (e.g. Header, Archive, Attribution, Blog posts...). These are rendered on every page. One type of box is simply HTML/Javascript where you can enter code at your own.
That's good thanks. I'll try that so. You don't have any step by step guides?
Cheers
Hauke Ingmar Schmidt
Rancher
Joined: Nov 18, 2008
Posts: 370
posted
1
There is not more to do than I already wrote.
When you created a blog at Blogspot/Blogger you can go to the "Design" tab, click on any "Add Gadget" link, select "HTML/Javascript" and paste the code from my first listing. That's it, now syntax highlighting is enabled.
In your blog post you then put your code in script tags like in the second listing. The code will be formatted.
If you run into any specific blockers, don't hesitate to ask.
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 295
posted
0
Thanks to all.
Hauke Ingmar Schmidt
Rancher
Joined: Nov 18, 2008
Posts: 370
posted
0
Oh, I am sorry, I forgot one important thing. You have to include the CSS for formatting. I put them to the code directly, that's why I missed them. Tab Design, Edit HTML. I included the following directly after the title tag.
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 295
posted
0
Thanks for this. I follow instructions, however, I am having difficulty adding Javascipt code which contains the <SCRIPT> tags.
I try...
I get:
Your HTML cannot be accepted: Closing tag has no matching opening tag: SCRIPT
Any ideas?
Note: My design template view, gives me two places to add the the HTML / Javascript gadget. I chose the top and put in the code you suggested?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32769
posted
0
You can't nest SCRIPT tags. What are you trying to achieve by doing that?
- You are missing two important lines from my example listing.
- Why are you using a Java brush for JavaScript?
- When highlighting JavaScript there exists this problem with this (the script) method. This is the only problematic case. You never mentioned JavaScript. But the other method works.
- You are missing two important lines from my example listing.
- Why are you using a Java brush for JavaScript?
- When highlighting JavaScript there exists this problem with this (the script) method. This is the only problematic case. You never mentioned JavaScript. But the other method works.
Ok I get all that.
Thanks a million.
Much appreciated.
kritika das
Greenhorn
Joined: Jun 17, 2011
Posts: 10
posted
0
This has been very helpful thread, as even i was planing to create a blog of my own.