Static Page Protocol

From Genecats
Jump to navigationJump to search


Template for new static pages

If you need to create a new static page, please use this html file as a template. (It's new and improved - using no tables for layout. :)

staticPageTempalte.html.zip

Or copy and paste the code from here:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>[PAGE TITLE] - UCSC Genome Browser</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<link rel="stylesheet" href="/style/HGStyle.css">
</head>
<body class="oldStaticPage">

<div class="header">
	<img src="../../images/title.jpg" alt="UCSC Genome Bioinformatics">
</div><!-- .header -->

<div class="nav">
<!--#include virtual="../../inc/topbar.html"-->
</div><!-- .nav -->

<div class="content">
<div class="section">
	
	<h1>Section #1 Title</h1>
	  
    <div class="sectionContent">

	<p>The content goes here...</p>
	
    </div><!-- .sectionContent --> 
</div><!-- .section -->

<div class="section">
	
	<h1>Section #2 Title</h1>
	  
    <div class="sectionContent">

	<p>The content goes here...</p>
	
	<!-- a sample table using new-ish styles added to HGStyle.css for displaying tabular data -->
	<table class="stdTbl">
		<thead>
		<tr>
			<th>Column header 1</th>
			<th>Column header 2</th>
		</tr>
                </thead>
		<tbody>
		<tr>
			<td>a1</td>
			<td>b1</td>
		</tr>
		<tr>
			<td>a2</td>
			<td>b2</td>
		</tr>
		</tbody>
	</table>	
	
    </div><!-- .sectionContent --> 
</div><!-- .section -->

</div><!-- .content -->
</body>
</html>

You may need to change the path for HGStyle.css and the header image (title.jpg) and the topbar.html include. The template is set as if it were in goldenPath/help/.

This template includes a typical static page (i.e. a help doc page) with two sections and a sample 4x4 html table (+ header row) using the .stdTbl class from HGStyle.css for all your tabular data presentation needs.

For the content section of your page, if you have a lot of raw text already written up that you could drop into this template, you might be interested in a tool Max created that will interpret markdown language located in /cluster/software/bin/markdownToStaticPage where a file with lines like # My first section\n List\n * one\n * two\n # my 2nd section\n hi there\n [test](http://www.google.com)\n _underline_\n code in text `like this`\n will be converted in a command like markdownToStaticPage test.md ~/public_html/temp/temp2.html to a page like this. Check with Max for more information.

Files Destined for the Round Robin and Mirrors (Public Documents)

  • These files should only be edited in your checkout of the git kent source tree at $HOME/kent/src/hg/htdocs/
  • After a make, copies will be located in /usr/local/apache/htdocs/ (this is the path used in push requests)
  • Make Procedure:
  1. Note: If your page is new and has a server side include (SSI) which looks something like this:
    <!--#include virtual="../../inc/topbar.html"-->
    make sure the execute bit is turned on for the file which can be done by doing this:
    chmod +x fileName
    This will need to be done before you do any makes or you will have to delete the rsync'd file, change the permissions, check them in, and redo the make.
  2. (optional) to view your changes on in your own sandbox, on hgwdev type: make user from $HOME/kent/src/hg/htdocs/.
    Have you created a new file and want to see it in your own sandbox before committing it to the tree? Type make user FIND=find. (Note that this will copy any files present in your $HOME/kent/src/hg/htdocs/ directory to your /usr/local/apache/htdocs-user/ directory, even if they are not checked in to git. To see what untracked files are in this directory, use our gitu utility.)
  3. To view your changes on http://hgwdev.cse.ucsc.edu/, on hgwdev type: make alpha from $HOME/kent/src/hg/htdocs/
  4. If your changes look good, check them in.
  5. To see changes on http://hgwbeta.cse.ucsc.edu/ (and to get them in the right place for a push request), on hgwdev type: make beta from $HOME/kent/src/hg/htdocs/
  6. If your changes are ready to go to the RR, then ask the cluster admins for a push of the file(s) in /usr/local/apache/htdocs/ from hgwbeta -> RR.

Large Files either Destined for the Round Robin or are Linked on Genomewiki (These files were too large to be checked into the main htdocs repository)

  • The types of files that are located here are help file examples, tutorial examples, or files that are linked to from Genomewiki.
  • After a make, files are located in /usr/local/apache/htdocs (this is the path used in push requests)
  • To edit these files, checkout the htdocsExtras repository in your home directory:
git clone yourlogin@hgwdev.cse.ucsc.edu:/data/git/htdocsExtras.git/ htdocsExtras
  • Make Procedure:
  1. (optional) to view your changes on in your own sandbox, on hgwdev type: make from $HOME/htdocsExtras/.
  2. To view your changes on http://hgwdev.cse.ucsc.edu/, on hgwdev type make alpha from $HOME/htdocsExtras/.
  3. If your changes look good, check them in.
  4. To see your changes on http://hgwbeta.cse.ucsc.edu/ (and to stage them for release to the RR), on hgwbeta type make beta in your $HOME/htdocsExtras/ directory.
  5. If your changes are ready to go to the RR, request a push of the file(s) in /usr/local/apache/htdocs from hgwbeta -> RR.

pdf files: example of htdocsExtras files

  • Typically pdf files belong in the separate htdocsExtras repository.
  • If you need to edit a pdf that has already been checked in:
    • pdfs are basically compressed binary files, so git will not be tracking lines of text changed.
    • Replace the file in the working dir with the new copy, git add, and git commit as usual. (No need to git rm it beforehand.)
    • Git will retain the history of who has modified it and when, even if it will not show useful diffs like a text file would.


Files Destined for hgdownload

  • These files are located in /usr/local/apache/htdocs-hgdownload/ (this is the path used in push requests).
  • To view them: http://hgdownload-test.cse.ucsc.edu/downloads.html.
  • Most of the data files here are NOT kept in a git repository.
  • To edit non-data static docs (such as downloads.html), checkout the hgdownload repository in your home directory:
git clone yourlogin@hgwdev.cse.ucsc.edu:/data/git/hgdownload.git/ hgdownload
  • Make Procedure:
  1. To view your changes on hgdownload-test (http://hgdownload-test.cse.ucsc.edu/) on type make alpha on hgwdev in $HOME/hgdownload
  2. If the changes look good, check them in.
  3. When ready to move to hgdownload, request a push from /usr/local/apache/htdocs-hgdownload/ on hgwdev -> /usr/local/apache/htdocs/ on hgdownload. (These files should not appear at all on hgwbeta.)

Files for Internal Use

  • These files are located in /usr/local/apache/htdocs-genecats/.
  • To edit these files, checkout the repository in your home directory:
git clone yourlogin@hgwdev.cse.ucsc.edu:/data/git/genecats.git/ genecats 
  1. To view your changes on http://genecats.cse.ucsc.edu/, type make install on hgwdev in $HOME/genecats.
  2. If your changes look good, check them in.

Example editing internal SLA.html

SLA.html is an html page which historically summarized outages for Service Level Agreement reporting and is an example internal page. In Jan 2017, these data were migrated to a Google Spreadsheet:

  • SLA Outage Report Worksheet.
  • Current manager of this spreadsheet: Alexa Lakey
  • Please contact the current manager of the spreadsheet to enter/modify outages.
  • The spreadsheet has a "README" tab to explain the spreadsheet format and best practices.

Editing sla.html

Gateway description.html pages

  • These pages live at /gbdb/$db/html/description.html and get pushed to hgnfs1 directly from hgwdev
  • They will not show up on beta (which uses hgnfs1) until pushed to hgnfs1 (which will also populate them on the RR), and so there is no "make beta" to populate these changes on beta (or beta-public).
  • To populate changes on hgwdev you do a make or a make alpha in kent/src/hg/makeDb/trackDb/ on hgwdev. See Static_content_for_new_assemblies for more info.

Unique markdown format files

  • Few pages, such as goldenPath/help/gbic.html do not live in the htdocs or htdocsExtra directory, but rather are populated through a htdocs/pandoc/... makefile.
  • For example the pandoc/installer/makefile pulls a README.md file located at /product/installer/README.md and plunks it into /usr/local/apache/htdocs/goldenpath/help/gbic.html for hgwdev and beta and a user's sandbox.
  • This process has the advantage of engineers only having to edit one README.md file, which will in turn generate a related help page like /help/gbic.html, so that ultimately documentation will not diverge.
  • Regular htdocs make user/alpha/beta will populate the pages, and regular push requests from beta are needed. See #17705 for more conversation on the topic.