News on TCM's web server
Notes on updating TCM's News, for those with write access to the
file and the ability to run web_scp
.
The "News" tab on TCM's home page takes its content from the file ~web/htdocs/front_page_news.html. The link to the "News Archive" is not contained in this file.
The news tab typically contains a centred image, and one or two
short paragraphs of text. If there are multiple stories, they can be
separated by <hr/>
.
Changes to this file are immediately visible on http://w6.tcm.phy.cam.ac.uk/, a server to which there should be no public- (or Google-) visible links. One can make changes until content with the result, which should have no scroll-bar in the tab when the window is at full width, or when the window is narrowed and then restored to full width, and there should be no unfortunate formating issues when the window width is decreased and the view flips to the mobile layout.
When one is content that all is correct, perhaps after checking that the new page is valid HTML via validator.org, one then types:
~web/htdocs$ web_scp front_page_news.html
which makes the page live on the main server.
(The difference
between w6
and www.tcm is that w6
takes all of its content from ~web/htdocs
, whereas
www has a local copy of that directory, to which web_scp
copies files, and its copy has symlinks to the subdirectories
of ~web/htdocs
. This arrangement improves performance
over w6, and enables one to test changes to the home page before
making them live. See this page for more details.)
Whenever an item is added to the news tab, a corresponding item
should be added to the News
Archive, which is found
in ~web/htdocs/news/archive.html
. Being in a
subdirectory, changes made here are immediately visible on the main
server.
Items in the archive can afford to be slightly longer than on the front page, with slightly more detail. The format is clear from copying from other news items. Each item is bracketed by
<div class="news_item"> </div>
and the columns magically sort themselves out automatically.
Again one should check that the HTML is valid using validator.org.