Plugin Information
Adds custom HTML content to header & footer on all Jenkins pages. Like Userscripts (e.g. Greasemonkey for Firefox) and Userstyles (e.g. Stylish for Firefox) - this saves you requiring all your users to add userscripts and userstyles. See jQuery Plugin and jQuery UI Plugin too. DescriptionThe Page Markup plugin implements the Jenkins 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 Jenkins. This facilitates site-specific page headers and footers, as well as <meta> tags. ConfigurationYou 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 Jenkins. Two new text boxes will appear in the Jenkins Configure System page under the Additional page HTML Markup heading. Any text added to these boxes will appear on all pages Jenkins generates. Example: implementing a custom site bannerMany 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 Jenkins 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):
[1] Note: the URL to use to reference the userContent directory is dependent on the --prefix option that you specify when launching Jenkins. 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 RequestsIf you have any issues, create a new ticket. SourceYou can check out the PageMarkup plugin from here using Subversion, or browse the source with Trac. How to BuildI had some trouble building the current v0.3. I need to modify the pom.xml as it has referenced a parent pom.xml which I did not have. Further some plugins where missing. You can find a Page Markup pom.xml as Attachment working with Jenkins 1.462 and checkout of Page Markup 0.3. pom.xml of tages/0.3 checkout with some patches See alsoThe Simple Theme Plugin which also allows for custom styling of the Jenkins instance. Change log0.3 - (23 September 2010)
0.2 - (21 May 2010)
0.1 - (21 April 2010)
|
Page Markup Plugin
Skip to end of metadata
Go to start of metadata
Comments (1)
May 27, 2014
Hubert Grzeskowiak says:
I wish I could inject HTML on top of the <head> element. This is required ...I wish I could inject HTML on top of the <head> element. This is required for the
to work. It needs to be the first line after <head> and before any other meta tags.
Add Comment