.

Adding Static Content to your Ensembl website

The public-plugins/ensembl/htdocs/info directory contains all the documentation needed for an Ensembl mirror. If however you are setting up a site with your own species, you may want to add your own pages, such as contact information for your project or general documentation that applies to all species.

Navigation

In order to avoid spending time maintaining navigation of static pages, the Ensembl code includes automated navigation. This is implemented as follows:

  1. At server startup, the module EnsEMBL::Web::SpeciesDefs parses the entire document tree for htdocs/info/ in all plugins, to produce a combined tree for the whole site
  2. This tree is then used to generate site navigation:
    • The main sitemap (a static HTML page generated using a perl script) includes an expandable version of the document tree
    • On each static page, a "breadcrumb trail" is constructed from the relevant path through the tree

In order to take advantage of this functionality, you simply need to make sure that you place your documentation in the htdocs/info directory of your plugin, and follow these simple rules when formatting your HTML files:

Sample file:

<html>
<head>
<title>About This Project</title>
<meta name="navigation" content="About" />
</head>

<body>
<h1>About This Project</h1>

[Your content here]

</body>
</html>

Omitting content from the navigation

There may be instances where you do not wish to have SpeciesDefs parse sections of the tree. For example, we do not include the contents of 'Pdocs' in the Ensembl documentation tree as it contains many hundreds of files and has its own navigation menu.

To omit part or all of a directory from the tree, use the "index" meta tag as follows:

N.B. Directories with no index.html file are omitted automatically, as it is assumed they exist purely to aid in organising the files.

Sample file:

<html>
<head>
<title>PDoc Documentation</title>
<meta name="navigation" content="Pdocs" />
<meta name="index" content="NO FOLLOW" />
</head>

<body>
<h1>Ensembl PDoc Documentation</h1>

[rest of page]

</body>
</html>

 

© 2024 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.

                
GermOnline based on Ensembl release 50 - Jul 2008
HELP