Page Markup Plugin

Plugin Information

No Information For This Plugin

Adds custom HTML content to header & footer on all Hudson pages.
Use this plugin to add your own custom content (e.g. CSS, site headers, and site footers) to Hudson pages.

Description

The Page Markup plugin implements the Hudson PageDecorator extension point to allow the site administrator to insert HTML markup into the page <head> element and just before the page </body> element on all pages generated by Hudson. This facilitates site-specific page headers and footers, as well as <meta> tags.

Configuration

You can download a prebuilt page-markup.hpi binary or build from source. Install page-markup.hpi into $HUDSON_HOME/plugins (either manually or through the Plugin Manager web interface) and restart Hudson. Two new text boxes will appear in the Hudson Configure System page under the Additional page HTML Markup heading. Any text added to these boxes will appear on all pages Hudson generates.

Example: implementing a custom site banner

Many organizations desire (or require) a standardized banner at the top of all web pages. To implement this, first create a local-site.css stylesheet, and place it in the userContent[1] directory in your Hudson installation:

body {
   margin-top: 50px;  /* the height of your site banner */
}
#site-banner {
   position: absolute;
   top: 0px;
   left: 0px;
   right: 0px;
   height: 50px;
   width: 100%;
}

Then, using the Page Markup plugin, inject your CSS into the header and your site banner within a div block into the footer (the CSS will tell the browser to reposition it to the top of the page):

  • Header
    <link rel="stylesheet" href="/hudson/userContent/local-site.css" type="text/css" />
    
  • Footer
    <div id="site-banner">
       <!--  your banner code goes here -->
    </div>
    

[1] Note: the URL to use to reference the userContent directory is dependent on the --prefix option that you specify when launching Hudson. In these examples, I am assuming --prefix=/hudson; adjust your URLs according to your local site configuration. Regardless, it is important to use an absolute URL (i.e. begins with a "/" character) when specifying content in the userContent directory.

Bugs/Feature Requests

If you have any issues, create a new ticket.

Source

You can check out the PageMarkup plugin from here using Subversion, or browse the source with Trac.

Change log

0.2 - (21 May 2010)

  • Corrected broken links to configuration help
  • Corrected link to project homepage

0.1 - (21 April 2010)

  • Initial release

Labels:

plugin-ui plugin-ui Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.