expoweb/handbook/computing/hbmanual1.html

100 lines
6.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CUCC Expedition Handbook: editing the handbook</title>
<link rel="stylesheet" type="text/css" href="../css/main2.css" />
</head>
<body>
<h2 id="tophead">CUCC Expedition Manuals - Editing the Handbook</h2>
<h1>Editing the Handbook (1)</h1>
<h2>Handbook editing manual</h2>
<p>These pages are for cavers wanting to:
<ol>
<li>quickly edit a correction using "Edit this Page", or
<li>edit several pages while sitting at the <em>expo laptop</em>
<li>edit several pages using their own laptop
</ol>
<h3 id="editthispage">"Edit this page"</h3>
<p>You can update a single webpage
online via a browser. This is best for urgent edits to a single page, e.g.
if the emergency phone at top-camp has to use a new SIM with a different phone number.
<p>You can edit web pages without installing any software or doing any configuration. It even works if your laptop is a Mac.
To use it you need to <a href="/accounts/login/">log in to troggle</a> using the well-known "cavey:beery" password. You generally only need to do this once.
<p>When you are a logged-on user you will see "Edit this page" at the bottom of the menu on the top-left of this page. It appears on
nearly all pages in this website. If you click on it you will be able to edit the content of the page.
<img class="onright" alt="gosser bier" src="../i/editthispage.jpg" />
<p>The image shows what it looks like when editing the "bierbook" page. There is a menu bar along the top of the panel where you can select the usual word-processing commands to make text <b>bold</b> or <em>italic</em> and to select syles such as headings or plain text.
<p>After editing the page you save your work by clicking on the "Submit" button at the bottom (see it at the bottom-left of the image).
<p>There is nothing to stop you editing lots of pages by this method but you will find it extremely tedious. It is especially tedious creating the links between pages.
<p><b>Footnote:</b> Currently this process does not properly tidy up after itself. Everyone can see your new edited page on the website immediately but you will need to ask a nerd to finish the process to make sure that your changes become persistent and don't get overwritten. [See the explanation at <a href="#tidy">the bottom of this page</a> if you want to know more.]
<h3>Autogenerated pages</h3>
<p>Some key sections of the online webpages are autogenerated from cave survey data
so you cannot use "Edit this page". These pages will not show "Edit this page" in the top-left menu even when you are logged in. If you need to change any of these you will need to <a href="manual.html">correct the underlying cave survey data</a></p>
<h3>Creating New Pages</h3>
<p>If you type in the name of a new webapge into the address bar of your browser, e.g. <a href="http://expo.survex.com/handbook/festering/spa.html">http://expo.survex.com/handbook/festering/spa.html</a> (e.g. if you want to document how to find a hot-tub in Altaussee) then troggle will offer to create the page for you. Just click on the blue text that says "Create this page":<br />
<img src="../i/createpage.jpg"/>
<p>Then once created, you can edit it the same way that you edit a pre-existing page.
<h3>Linking in New Pages</h3>
<p>You link your new page into the handbook by editing another page in which you want to create a link. For example if you have created a new page describing your wonderful new sleeping bag/hammock technique, then you might want to add a link in to <a href="../kitlist.html">Expo Personal Gear List</a>. Unfortunately the "create link" icon (a picture of 3 links of a chain) is disabled in the on-line editor so you would have to click on the HTML icon and insert the link by editing the HTML directly.
<h3>Conventions</h3>
<h4>Encoding</h4>
<ul>
<li>We specify that pages are encoded using <a href="https://www.w3schools.com/charsets/ref_html_utf8.asp">UTF-8</a> for all content.
<li>When editing webpages, use <a href="https://www.freeformatter.com/html-entities.html">HTML entities</a> for characters with umlauts, e.g. <em>&amp;ouml;</em> for &ouml;.
<li>Only use a UTF-8 encoding if there is no HTML entity, e.g. biohazard: <span style='font-size:30px;'>&#9763;</span>
</ul>
<h4>Filenames</h4>
<ul>
<li>No spaces in filenames. Use underscores or hyphens.
<li>No filenames starting with "-" or "!" (Mac users beware)
<lI>All filenames to start with an alphabetic letter.
<li>All filenames to be in lower case, must not use umlauts, must not have extra full-stops in the name.
<li>Don't use capitals in any sort of identifier. If you have to, make _sure_ that they are used exactly the same everywhere.
Otherwise it's easy to make pages that work on Windows, but which don't on Linux.
<li>When you use "Edit this page" you are editing on the server which is a Linux machine.
<li> Never create two files spelt the same except for capitalisation. They will overwrite each other if edited on a Windows machine <em>without any warning</em>. This is particularly a problem for the filenames generated on phones for photographs.
</ul>
<hr />
<h3 id="tidy">Tidying up and commiting the edits</h3>
<p>'Edit This Page' edits the file served on the web but it does not update the file in the version control
repository. To properly finish the job you need to get a nerd to
<ul>
<li>
ssh into expo@expo.survex.com from a machine already configured to do this
<li>cd to the directory containing the repo you want, i.e. "cd expoweb" for the handbook, which takes you to /home/expo/expoweb
<li>Run "<a href="https://www.selenic.com/mercurial/hg.1.html">hg status</a>" (to check what
changes are pending),
<li>then "<a href="https://www.selenic.com/mercurial/hg.1.html">hg diff</a>" to see the changes in detail
(or "hg diff|less" if you know how to use "less") and
<li>then DO NOT just run '<a href="https://www.selenic.com/mercurial/hg.1.html">hg commit</a>' unless you know how <em>emacs</em> works as it would dump
you into an emacs editing window (C-x C-C is the way to exit emacs). Instead, use the "-m" option:
<code>hg commit -m "changed topcamp phone number - myName" </code>
which submits the obligatory comment with the commit operation. You should write something informative and brief about your changes between the quotation marks and also give your full name.
</ul>
<p>We intend to make this issue go away when we migrate the expoweb repo from mercurial to git during 2020.
<hr />
<p>Go on to <a href="hbmanual2.html">Editing several pages</a><br />
Return to <a href="onlinesystems.html">Online systems overview</a>
<hr />
</body>
</html>