Friday 9 April 2021
This page contains information for contributors who have been given direct access to add ride reports, campaigning articles or news items to the CTC Cambridge website.
These articles are managed using Google's Blogger product. Adding a new article involves using Blogger to create a new blog post.
You will need a Google account, and the web officer will need have to have registered you as an authorised contributor to the blog.
Once you have been given access, go to Blogger at https://draft.blogger.com/blog/posts/5872226291522631077 . Sign in if necessary using your Google account.
You will see a long list of website articles:
To create a new article, click the "new post" button at the top left.
To edit an existing article, scroll down until you find the article and click on it. You can only edit articles created by you (though the webmaster can edit all articles).
The "post editor" will then open. This can be used in two modes: "Compose view" or "HTML view". You can switch between the two modes using the left-most button.
Enter a title for your article in the field at the top.
Enter the text of your article in the large field below. You need to type <p> at the start of each paragraph.
<p>
This is the text of the first paragraph.
<p>
This is the text of the second paragraph. A blank line will be automatically inserted between paragraphs.
The date of your post will, by default, be automatically inserted beneath the title. This is normally what you want: ride reports and news items should always have a date.
However you can prevent the date being displayed by including the following at the top of your post.
<!-- Suppress the display of the date -->
<style>.c2-blogdate{display:none}</style>
If you need subheadings in your article you should type the appropriate HTML into the editor. It's best to use the "sub-heading" <h3> and "minor heading" <h4> styles. On the blog post you're currently reading, the heading above this paragraph is <h3>.
<h3>This is a sub-heading</h3>
<p>
This is the text of the first paragraph after the sub-headinbg.
Don't use "major heading" <h1> level: this level is automatically used for the article title, and is too large to use in other places.
<p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQiLO82AQwP_rWvKrlGG3biOBUaKfuYbM3nmiDfmMpGtwMeEArxZ16ruFFr61ybOUddagfPMTGXKKLHQlgiB7UX5WPTSBtaU4VKjtQinczcImNIE9-16aiy8otOAq2bqPVyA6craalg0/s2048/fenstanton.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQiLO82AQwP_rWvKrlGG3biOBUaKfuYbM3nmiDfmMpGtwMeEArxZ16ruFFr61ybOUddagfPMTGXKKLHQlgiB7UX5WPTSBtaU4VKjtQinczcImNIE9-16aiy8otOAq2bqPVyA6craalg0/s320/fenstanton.jpg"/></a>This is the caption</div>
</p>
This section is only relevant if this article is shared on social media.
If you wish you can specify which of the photos on this page will be used by Facebook, Mastodon etc when it creates a preview picture. This is done by adding a special attribute data-ogimage to your chosen <img> element . For example:
<p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQiLO82AQwP_rWvKrlGG3biOBUaKfuYbM3nmiDfmMpGtwMeEArxZ16ruFFr61ybOUddagfPMTGXKKLHQlgiB7UX5WPTSBtaU4VKjtQinczcImNIE9-16aiy8otOAq2bqPVyA6craalg0/s2048/fenstanton.jpg" style="padding: 1em 0; text-align: center; "><img data-ogimage alt="" border="0" width="320" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQiLO82AQwP_rWvKrlGG3biOBUaKfuYbM3nmiDfmMpGtwMeEArxZ16ruFFr61ybOUddagfPMTGXKKLHQlgiB7UX5WPTSBtaU4VKjtQinczcImNIE9-16aiy8otOAq2bqPVyA6craalg0/s320/fenstanton.jpg"/></a>This is the caption<div/>
</p>
If you don't specify an image in this way then the first photo will be used.
(The website uses this information to set the og:image meta property on the web page.)
If you are writing a ride report and want to include a map of the route then obtain a GPX file of the route (generated either by a GPX device or by manually entering the route in a route planning website) and send it to the webmaster.
The webmaster will upload the GPX file to the website and supply you with a fragment of HTML to paste into your article. This will be of the following form:
<iframe class="emmap" src="https://ctccambridge.org.uk/rides/nnnn/map" height="500px"></iframe>
The only part of this HTML fragment which will vary is nnnn. For rides in the club's rides list you can find out nnnn by clicking on the ride in the rides list, going to the details page for that ride, and looking at the URL.You can use the ?mapType parameter to specify the map type. If omitted the map type will default to whatever the reader chose last, or Open Street Map by default.
Since this is a fragment of HTML you will need to switch to "HTML view" before pasting it in.
In your article you're free to give distances in either miles or kilometres: it's up to you. However you are recommended to use both: if you use the following HTML your readers will see distances in whichever unit they prefer (you will have to enter the appropriate values in km and miles yourself).
<span class="displaykms">17 km</span>
<span class="displaymiles">11 miles</span>
<div class="rrlogo"></div>
If you haven't published the article yet then your article is considered to be a "draft". Any changes you make will be saved automatically.
Click the "Preview" button to see a preview of what your
article will look like when published. Please note that this preview is
approximate and doesn't show you exactly what the article will look
like, so you should check your article again after you publish it.
When you are ready to publish the article, click the "Publish" button.
If you are editing an article which has already been published then the "Publish" button is replaced by one labelled "Update". Use this to apply your changes.
You can use the left-pointing arrow (top left) to go back to the long list of website articles. If your article has been published you will will see it in the list.
After you publish or update an article you should always review what it looks like on the website. To do this, move the mouse over the article name and then click on the "view" button. This will open the page on the CTC Cambridge website.
When reviewing a published article try clicking on a photo and check that it appears appropriately in the photo viewer, and whether any caption you supplied is displayed below the photo in the photo viewer.
Please be aware that after you publish an article, the page content will be cached on the web server. The cache will be automatically rebuilt after a time. However this means that if you update an article and then look at it on the website you will probably not see your latest changes.
You can "refresh" the cached page content by carefully appending
When you publish (or update) an article you are creating a new page on the website. However until you define a "label" your article will not appear in the index and will not be linked from anywhere, so it will only be visible to people who know the URL. This gives you an opportunity to double-check your article before adding it to the index.
To allow readers to find your article, add one of the following labels:
(Yes, using the label "news" is a bit odd for ride reports, but we're stuck with it)
You can display short news items and other announcements on the front page of the website (as well as on their own page) by giving them the label frontpage-top, frontpage-large or frontpage-small
Only the webmaster, club secretary or runs secretary should do this. If you're not sure you can always publish the article and then ask the webmaster to add the label to put it on the front page.
After adding one of these labels you can see what the front page of the website looks like by visiting https://ctccambridge.org.uk/?refresh (this refreshes any cached version and takes 30-60 seconds).
To add an article to the "news archive", add the label announcement. This allows people to find your news item, even if it is no longer displayed on the front page.
To create an "advert" for the article, add the label
Other possible labels are frontpage-top-test, frontpage-large-test, frontpage-small-test or advert-test. These can be used for testing. They are used by the staging website (or a local website) but are ignored by the production website.
If your article isn't a ride report, a news item or a campaigning article then you may want to add it to the main index, which is the first thing people see when they click on the "Index" button.
Publish the article as usual, without setting any labels. Then send the link to the webmaster and ask for it to be added to the main index.
If you're writing an announcement for the front page of the website, and your article is slightly too long, you can write a short introduction and hide the rest of the article behind a light-grey "See more..." link. If your article is very long then don't do this: it's better to write a separate news article which links to the full article.
Introductory text text. <div class="hideinitially">
<p>
More text text text.
</div>
Note that when the same article appears on its own page the "See more..." is omitted and the whole page is always displayed.
You can replace the text "See more..." with different words by setting the attribute data-showanchortext as follows:
Introductory text text. <div class="hideinitially" data-showanchortext="Show FAQs...">
<p>
More text text text.
</div>
This feature is ignored on actual blog pages. So a blog post that contains "See more..." links when it appears on the front page of the website will be displayed in full when it appears on its own page (e.g. when accessed via the index). However you can override this by adding the following to the top of your post:
<!-- enable the use of hideInitially constructs on this blog page -->
<script>let useHideInitially=true;</script>