裝上 SyntaxHighlighter

| | 迴響 (26) | 引用 (0)


為了要在前一篇:裝上 Lightbox Plus 裡加上一些 code 的展示,又額外裝了 SyntaxHighlighter,所以說啊,技術的東西真是一腳踏進去會愈陷愈深啊...


同前篇,下載解壓縮丟到伺服器,然後去修改 Header Template:

接著修改 Footer Template,記住要放在 </body> 之前:

使用的時候呢,就把 code 用如下的方式包起來就可以了:

其中要注意的地方是 name="code" 是固定的,class="html" 則是指定 code 所使用的語言,可以參考官方的列表。例如要使用 C#,就可以寫 class="c#" 或者 class="csharp" 都可以。同時要注意也要把相對應的 JavaScript 檔引進你的 Header Template。另外它還有一些參數可供參考,請自行取用,這邊就不多做解釋了。


參考資料:
Syntax Highlighting for your Movable Type blog - Blog of Max Horvath


這篇屁話被收在分類:

0 則引用

本篇屁話的引用連結 : http://thecrap.org/mt-tb.cgi/393

引用 裝上 SyntaxHighlighter 的文章如下 :

26 則迴響

Scotty Wylde 說:

When I was in school, graduated in 1976, if you were caught using a calculator you got a detention. Now, If you dont have one, you get a detention. Its not hard to see why these kids running cash registers cant count change, they have to read the print out, and if that isnt working, they are just lost. Kind of sad that we are letting computers and electronics replace using our brains for so many things. They are a heck of an advantage on a lot of things, but they are totally destroying our kids ability to connect personally with one another, and basically dumbing down their brains. I see it all the time.

Liberals seek to silence and demonize those who oppose their socialism

Look at this from Mike James in Germany. He has always been anti-zionist, but look how they expose themselves!

Emory Timme 說:

In this year (and most years, probably) 16 teams is enough to catch every team in a BCS conference with 2 or less losses, plus undefeated teams from non-BCS conferences. If you wanted to ban 3 loss teams from the playoffs, you could do that as well. This year, Arkansas would be out (Wake Forest, Virginia Tech, and Rutgers all move up a spot) and Brigham Young goes into the 16th slot.

Amen. My sentiments exactly.We christians and our churches failed when we let the government become responsible for charity, welfare, and entitlements. Jesus told individuals to be charitable, never governments. God blesses us when we give to others.

Great splits Flo! You would hardly know there were hills in that race by looking at your watch. That was quite a swan song you just pulled off!

tarot 806 說:

Between me and my husband we've owned more MP3 players over the years than I can count, including Sansas, iRivers, iPods (classic & touch), the Ibiza Rhapsody, etc. But, the last few years I've settled down to one line of players. Why? Because I was happy to discover how well-designed and fun to use the underappreciated (and widely mocked) Zunes are.

Well..yes because it shares something that is happening now.

Charla Morre 說:

Yes, it shows what we need to know.

Yes, i am glad that your asking us to know our opinion.

Rattling superb information can be found on site . "Every artist was first an amateur." by Ralph Waldo Emerson.

Firefox wont start but when I open a link that opens firefox, It works fine. What do I do?

When is it time to purchase a new computer?. . Some people I have talked to told me its good to purchase a new computer every 2 years however that could be expensive for most people. I always thought every 4-5 years.. . What is your opinion on this?. . The computer I own is 11 months old?.

classifieds 說:

I use firefox and some nights at 12:00 exactly or 12:30 exactly, firefox stops working and does not load a page. The internet connection is perfectly fine though because it says excellent. I am connected to a home router and the signal strength is always excellent. I do not know why this happens at exactly 12:00 or 12:30 on my desktop time but it's a pain. I've tried "ping"ing and everything looks fine..

It is appropriate time to make some plans for the future and it is time to be happy. I've read this post and if I could I want to suggest you few interesting things or tips. Maybe you can write next articles referring to this article. I wish to read more things about it!

Thank you for another informative website. Where else could I get that kind of info written in such an ideal way? I have a project that I am just now working on, and I have been on the look out for such information.

Jose Sudekum 說:

Are you certain about this?

You really make it seem so easy with your presentation but I find this topic to be actually something which I think I would never understand. It seems too complicated and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!

Fine web site below! Furthermore your web site a whole lot all the way up quick! Which number are you presently implementing? Could i obtain your affiliate marketing hyperlink to an individual's coordinator? If only the web site crammed as rapidly because the ones you have hehe

Gutscheine 說:

let's go and post some more

I am now not certain where you are getting your info, however great topic. I needs to spend a while studying more or understanding more. Thank you for excellent information I used to be on the lookout for this info for my mission.

Kendal Tselee 說:

Well..yes because it shares something that is happening now.

uggs 說:

I merely want to read new topics within you blog.;??;*;

ugg boots uk 說:

Wow! Thanks a lot! I continually required to write in my website the like. Am i able to add a fragment of one's post to my website?

給我一點 tempo

About

這篇屁話是由 Alvin Wu 發表於 May 23, 2008 8:48 AM

上一篇是 裝上 Lightbox Plus

下一篇是 Firefox 與 Java

首頁 可以找到最近的屁話,或是到 彙整 去看全部的屁話紀綠

Powered by Movable Type 4.34-en