Difference between revisions of "Code4Lib Journal WordPress Input Guidelines"

From Code4Lib
Jump to: navigation, search
(Bibliographies/Endnotes)
(Author Information)
Line 92: Line 92:
 
End each article with a second-level header that says "About the Author(s)", then give a short paragraph about each author.
 
End each article with a second-level header that says "About the Author(s)", then give a short paragraph about each author.
  
Add a custom field to the article called "author". Anything you put in this field will be treated as the author of the article. This will show up in the ToC and in the syndication feeds. If you don't populate this field, then there will be no author information attached to the article.
+
Add a custom field to the article called "author" (see the bottom of the "write post" page). Anything you put in this field will be treated as the author of the article. This will show up in the ToC and in the syndication feeds. If you don't populate this field, then there will be no author information attached to the article.
  
 
==Categories/Tags==
 
==Categories/Tags==

Revision as of 05:31, 5 December 2007

Please follow the guidelines below when creating or editing Code4Lib Journal articles in WordPress. Enter all articles as "Posts".

Title

Title, including the subtitle, goes in the "Title" field.

Article Content

The body of the article goes in the "Post" field. The top-level header (<h1>) is used for the title of the post, so start with second-level headers (<h2>) for sections of the article. Any header from second- to sixth-level may be used as appropriate. Use HTML markup appropriately and semantically, e.g., <em> for emphasized text, <strong> for strongly emphasized text, <blockquote> when quoting blocks of text. Avoid such monstrosities as <font> and <blink>.

Pasting from Word

If you just paste content from Word into WP, it ends up with REALLY BAD html. Fortunately, WP has a built-in feature to help with this. Open the 'advanced toolbar' in editing GUI (right-most link), then click on the paste-from-word icon. This transforms Word's html into really nice pretty html.


Images and Attached Content

Two options for images and other attached content/media:

  1. use WordPress uploaded content managing feature, or
  2. upload the content to our host manually.

jrochkind found the WordPress content managing feature to be more of a pain than it was worth, so is uploading content manually. To do that, sftp to c4ljeditor@login.ibilio.org. Ask jrochkind for the password for the c4ljeditor account.

Change directory to: /public/vhost/c/c4lj/html/media

in there you'll find an "issue1" subdir. Inside THERE (or other issue dir), create a subdir with the last name of the first author, and put all your image and other attached content in there. It will now have this sort of url: imagename.png

Add to your img src or a href's as desired. You can use this not just for images, but for extended code attachments, etc.

Code

Put all code in <pre> tags.

Code Highlighting

If the code is in a supported language, we can do syntax highlighting. To make this work, you still wrap your code in <pre> tags. Inside of the <pre> tags, but around your code, include

[sourcecode language='langcode']...[/sourcecode]

Replace langcode with the appropriate code from the following list (if more than one option for a language, any one will work).

Language Code
C++ cpp, c, c++
C# c#, c-sharp, csharp
CSS css
Delphi delphi, pascal
Java java
JavaScript js, jscript, javascript
PHP php
Python py, python
Ruby rb, ruby, rails, ror
SQL sql
VB vb, vb.net
XML/HTML xml, html, xhtml, xslt

Example:

<pre>[sourcecode language='css']body {
   font-size: 0.625em;
   background-color: #0000ff;
   color: #ffff00;
}[/sourcecode]</pre>

External Content

Abstract

While you are editing the article, there is a box labeled "Optional Excerpt" a little ways below the "Post" field. Put the abstract here. Use HTML markup as appropriate. What you put in this field is what will be distributed in our syndication feed and what will appear before the article as the abstract.

Bibliographies/Endnotes

We would like to provide COinS information with every appropriate citation that does not have a publically accessible url.

  • Recommended COinS generator: http://generator.ocoins.info/
  • Another option is to use the WP COinS plugin. Open the Code tab, put the cursor before the citation, and click COinS. Enter the appropriate information. This works so-so for journals, and not at all for books.
  • COinS should really always have an ISSN or ISBN.
  • I have been inserting the string "(COinS)" inside the span tag, so the user without a browser extension will see that something is there she might be interested in. This might be better replaced with a link to a brief page we provide on what COinS can do for you and where to find a browser extension.

Author Information

Start off each article with a paragraph stating the name(s) of the author(s). Something simple like "By Jonathan Rochkind". If desired, the author's name can be a link to something appropriate.

End each article with a second-level header that says "About the Author(s)", then give a short paragraph about each author.

Add a custom field to the article called "author" (see the bottom of the "write post" page). Anything you put in this field will be treated as the author of the article. This will show up in the ToC and in the syndication feeds. If you don't populate this field, then there will be no author information attached to the article.

Categories/Tags

Every article in issue 1 should be put in a category "Issue 1". Etc. This should make it easier to generate issue specific RSS feeds and do other stuff at a later date.