Another little improvement for the HTML recipe. This time is for properly highlighting attributes whose name contains a dash, like “http-equiv”. I also touched the tag rule, so that the DOCTYPE is recognized now:
HTML Recipe: Multiline Attributes
Some days ago I discovered that an HTML tag can have attributes whose values span multiple lines. This is very useful when the value is a piece of javascript code, which in fact is immune to white space.
The HTML recipe I bundled to Chili 1.5 is a bit wrong, though, because it doesn’t consider that possibility. This is one that does:
How to add a PunchCard to each WordPress post
What you find in the PunchCard Manual is valid in general for any html page and blog system, but if you need a 5 minutes guide for adding a properly formatted PunchCard to each WordPress post, here it is.
- download PunchCard 1.2, and extract it to a local folder
- locate the file jquery-1.1.1.pack.js and upload it to the remote folder / wp-content / jquery /
- upload all the other files to the remote folder / wp-content / jquery / punchcard /
- edit the remote file / wp-content / themes / default / header.php,
locate the</head>tag, add the following code right before it, and then close and save the file: - edit the remote file / wp-content / themes / default / index.php,
locate the<p class="postmetadata">tag, add the following code right before it, and then close and save the file:
That’s all.
- you can repeat step 5. for the file / wp-content / themes / default / single.php
- if you are not using the default theme, remember to appropriately change the path to the theme folder in the previous steps
Following this fast guide you’ll get a PunchCard at the bottom of each post, like mine. Each PunchCard will reference your post (title and URL).
Feel free to play with the PunchCard stylesheet and setup for customizing your punchcards.
