Skip to content

Commit

Permalink
TOC Updates
Browse files Browse the repository at this point in the history
Disable TOC for posts/pages where there are no contents. Add TOC, word-count (meta) and featured-image for non-post content.
  • Loading branch information
sparksp committed Dec 14, 2022
1 parent ee2df87 commit b00f134
Show file tree
Hide file tree
Showing 37 changed files with 173 additions and 73 deletions.
4 changes: 2 additions & 2 deletions content/about/index.md
Expand Up @@ -2,18 +2,18 @@
title = "About Phill"
date = 2018-12-29T18:05:23Z
layout = "about"
toc.enable = false

[menu.main]
name = "About"

[[resources]]
name = "featured-image"
src = "phills.jpg"
title = "Photo of Phill Sparks drinking a cup of coffee"
+++

![Photo of Phill Sparks drinking a cup of coffee](phills.jpg)
{.circle .center}
{.circle .center .small}

### Climber • Instructor • Coach

Expand Down
13 changes: 13 additions & 0 deletions content/contact-success/index.md
@@ -0,0 +1,13 @@
+++
title = "Contact Phill"
sitemap_exclude = true
toc.enable = false
meta = false

[menu.main]
parent = "Contact"
+++

{{< admonition success "Message Sent" true >}}
Your message has been sent. Phill will try to get back to you as soon as possible.
{{< /admonition >}}
33 changes: 0 additions & 33 deletions content/contact/_index.md

This file was deleted.

35 changes: 35 additions & 0 deletions content/contact/index.md
@@ -0,0 +1,35 @@
+++
title = "Contact Phill"
linktitle = "Contact"
menu = [
"main",
"footer"
]
toc.enable = false
meta = false
+++

{{< grid >}}{{% grid/column md-11-24 %}}
Please get in touch if you'd like more information about any of my courses...

Email me at [hello@phills.me.uk](mailto:hello@phills.me.uk?subject=Climbing+Course+Enquiry).

Leave me a voicemail on [07764498307](tel:07764498307).

Or fill in the contact form with your name, e-mail address and query.
{{% /grid/column %}}
{{< grid/column md-1-24 >}}<br>{{< /grid/column >}}
{{< grid/column md-12-24 >}}
{{< form name="contact" action="/contact-success/" >}}
{{< form/text name="name" label="Name" required="yes" autofocus="yes" >}}
{{< form/email name="email" label="E-mail address" required="yes" >}}
{{< form/tel name="tel" label="Phone number" >}}
{{< form/text name="subject" label="Subject" required="yes" value="Course Enquiry" >}}
{{< form/textarea name="message" label="Message" required="yes" >}}
{{< form/recaptcha >}}
{{< form/checkbox name="consent" required="yes" >}}
I consent to this website storing this information so they can respond cordingly.
{{< /form/checkbox >}}
{{< form/submit label="Send" >}}
{{< /form >}}
{{< /grid/column >}}{{< /grid >}}
9 changes: 0 additions & 9 deletions content/contact/success.md

This file was deleted.

1 change: 1 addition & 0 deletions content/experience.md → content/experience/index.md
Expand Up @@ -7,6 +7,7 @@ aliases = [
"/experience/climbing/the-climbing-station/",
"/experience/climbing/beaumanor-hall/"
]
toc.enable = true
+++

## Climbing Experience
Expand Down
2 changes: 2 additions & 0 deletions content/posts/crowdlab/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/crowdlab"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "crowdlab.jpg"
Expand Down
1 change: 1 addition & 0 deletions content/posts/css_for_poker_players.md
Expand Up @@ -8,6 +8,7 @@ aliases = [
"/blog/2007/04/14/css_for_poker_players",
"/post/css_for_poker_players"
]
toc.enable = false
+++

I've just read an excellent explanation of [CSS Specificity using a poker analogy](http://carl.camera/?id=95) and it just makes it so clear to hear it like that. The author covers everything in terms of the basic hands available in a game of poker. This can help explain some of the many mysteries of CSS!
Expand Down
1 change: 1 addition & 0 deletions content/posts/curl_error_26.md
Expand Up @@ -8,6 +8,7 @@ aliases = [
"/blog/2008/08/26/curl_error_26",
"/post/curl_error_26"
]
toc.enable = false
+++

Last night I started working on Lilly's 365 and very quickly ran into a few problems. Most were simple quirks of [site5](http://www.site5.com/in.php?id=51960) fixed by getting the permissions right. The thing that kept bugging me was Phlickr, and more specifically its use of [cURL](http://curl.haxx.se/).
Expand Down
2 changes: 2 additions & 0 deletions content/posts/domigoals/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/domigoals"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "domigoals.jpg"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/dynamic-cacher.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["php", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

My own simple cache service written in PHP. More a proof of concept than anything else.

### Code

```php
<?php

Expand Down
3 changes: 1 addition & 2 deletions content/posts/factor-test.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["php", "code"]
categories = ["programming", "snip"]
author = "lavalamp"
toc.enable = false
+++

PHP factor test for very large numbers.

### Code

```php
<?php

Expand Down
2 changes: 2 additions & 0 deletions content/posts/high-adventure/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/high-adventure"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "high-adventure.jpg"
Expand Down
1 change: 1 addition & 0 deletions content/posts/how_to_customise_your_ssh_config.md
Expand Up @@ -8,6 +8,7 @@ aliases = [
"/blog/2008/04/13/how_to_customise_your_ssh_config",
"/post/how_to_customise_your_ssh_config"
]
toc.enable = false
+++

I am someone who feels more comfortable using the command-line than many GUI set-ups and who is often SSH-ing between servers; many of these servers have lengthy host names and require various different usernames; luckily the SSH developers thought ahead and came up with a way of pre-setting most options per-host.
Expand Down
Expand Up @@ -8,6 +8,7 @@ aliases = [
"/blog/2008/04/13/how_to_stop_iphoto_from_opening_automatically",
"/post/how_to_stop_iphoto_from_opening_automatically"
]
toc.enable = false
+++

I've stopped using iPhoto recently in favour of [Flickr](http://flickr.com) but every time I plug in a camera, or something that looks like it could be a camera, iPhoto opens. A quick hunt around the Internet and I found the solution...
Expand Down
3 changes: 1 addition & 2 deletions content/posts/htodo-user-script.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["javascript", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

Adds hTodo support to the operator toolbar.

### Code

```javascript
/**
* Adds hTodo support to the operator toolbar.
Expand Down
2 changes: 2 additions & 0 deletions content/posts/hybrid-city/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/hybrid-city"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "hybrid-city.jpg"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/isync-reactor.md
Expand Up @@ -10,13 +10,12 @@ aliases = [
tags = ["applescript", "osx", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

This script will launch iSync and ask it to synchronize and terminate. It will also refresh calendars in iCal.
Protection is added to prevent frequent syncing and leave iCal/iSync running if they were already running

### Code

```applescript
(*
iSync Reactor
Expand Down
3 changes: 1 addition & 2 deletions content/posts/js-page-navigation.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["javascript", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

Simple script to find first/prev/next/last links and navigate to them.

### Code

```javascript
/**
* Simple script to find first/prev/next/last links and navigate to them.
Expand Down
2 changes: 2 additions & 0 deletions content/posts/laravel/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/laravel"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "software-design-patterns-in-laravel.png"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/mp3-search.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["javascript", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

A quick JS snippet to search Google for MP3 files with the given name.

### Code

```javascript
/**
* A quick JS snippet to search Google for MP3 files with the given name.
Expand Down
2 changes: 2 additions & 0 deletions content/posts/my-charnwood/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"project/my-charnwood"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "my-charnwood.jpg"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/new-item-alert.md
Expand Up @@ -11,12 +11,11 @@ aliases = [
tags = ["applescript", "osx", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

This Folder Action handler is triggered whenever items are added to the attached folder. The script will display a [Growl](https://growl.github.io/growl/) message containing the number of items added.

### Code

```applescript
(*
New Item Alert
Expand Down
3 changes: 1 addition & 2 deletions content/posts/new-terminal.md
Expand Up @@ -11,12 +11,11 @@ aliases = [
tags = ["applescript", "osx", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

Launch a new Terminal window, regardless of Terminal already running.

### Code

```applescript
(*
New Terminal
Expand Down
2 changes: 2 additions & 0 deletions content/posts/pantheon/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/pantheon"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "pantheon.jpg"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/php-id.md
Expand Up @@ -10,12 +10,11 @@ aliases = [
tags = ["bash", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

A handy script to insert `$Id$` comments in PHP files.

### Code

```bash
#!/bin/bash

Expand Down
2 changes: 2 additions & 0 deletions content/posts/pineapster-tickets/index.md
Expand Up @@ -5,6 +5,8 @@ categories = ["programming", "project"]
aliases = [
"/project/pineapster-tickets"
]
toc.enable = false

[[resources]]
name = "featured-image"
src = "pineapster-tickets.png"
Expand Down
3 changes: 1 addition & 2 deletions content/posts/refitconf.md
Expand Up @@ -11,12 +11,11 @@ aliases = [
tags = ["refit.conf", "config", "code"]
categories = ["programming", "snip"]
license = "<a href=\"https://unlicense.org\">Unlicense</a>"
toc.enable = false
+++

My preferred settings for [rEFIt](http://refit.sourceforge.net/).

### Code

```text
timeout 10
hidebadges internal
Expand Down
3 changes: 1 addition & 2 deletions content/posts/related-content.md
Expand Up @@ -11,12 +11,11 @@ aliases = [
tags = ["sql", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

SQL to hunt down the 5 most relevant pieces of content by tag. This schema uses `uri` as the primary key for content (a foreign key in the tags table).

### Code

```sql
/**
* SQL to hunt down the 5 most relevant pieces of content by tag. This schema
Expand Down
3 changes: 1 addition & 2 deletions content/posts/ssh-avahi-service.md
Expand Up @@ -9,12 +9,11 @@ aliases = [
tags = ["xml", "unix", "code"]
categories = ["programming", "snip"]
license = "<a href=\"http://creativecommons.org/licenses/by-sa/2.0/uk/\">Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales</a>"
toc.enable = false
+++

Simple [Avahi](https://www.avahi.org/) definitions for SSH services including Fish and SCP.

### Code

```xml
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
Expand Down

0 comments on commit b00f134

Please sign in to comment.