fix issue with apostrophes in titles

This commit is contained in:
Tom Johnson 2017-11-02 11:02:48 -07:00
parent 090f06705f
commit 8a0f37d913
5 changed files with 8 additions and 7 deletions

View File

@ -66,7 +66,7 @@
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: '{{ "search.json" }}',
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "\'", "\"}}">{title}</a></li>',
searchResultTemplate: '<li><a href="{url}" title="{{page.title | escape }}">{title}</a></li>',
noResultsText: '{{site.data.strings.search_no_results_text}}',
limit: 10,
fuzzy: true,

View File

@ -1,5 +1,5 @@
---
title: Getting started with the Documentation Theme for Jekyll
title: "Getting started with the Documentation's Theme for Jekyll"
keywords: sample homepage
tags: [getting_started]
sidebar: mydoc_sidebar

View File

@ -1,5 +1,5 @@
---
title: About the theme author
title: About the theme's author
keywords: documentation theme, jekyll, technical writers, help authoring tools, hat replacements
last_updated: July 3, 2016
tags: [getting_started]
@ -9,7 +9,7 @@ permalink: mydoc_about.html
folder: mydoc
---
My name is Tom Johnson, and I'm a technical writer, blogger, and podcaster based in San Jose, California. My blog is here: [http://idratherbewriting.com](http://idratherbewriting.com). I write several posts there a week. See [my blog's about page](http://idratherbewriting.com/aboutme/) for more details about me.
My name is Tom Johnson, and I'm a technical writer, blogger, and podcaster based in San Jose, California. For more details, see my [technical writing blog](http://idratherbewriting.com) and my [course on API documentation](http://idratherbewriting.com/learnapidoc/). See [my blog's about page](http://idratherbewriting.com/aboutme/) for more details about me.
I have used this theme and variations of it for various documentation projects. This theme has undergone several major iterations, and now it's fairly stable and full of all the features that I need. You are welcome to use it for your documentation projects for free.

View File

@ -31,7 +31,8 @@ If this happens, go directly to the search.json file in your browser, and then c
The search.json file already tries to strip out content that would otherwise make the JSON invalid.
## Including the body field in search
I've found that include the `body` field in the search creates too many problems, and so I've removed `body` from the search. You can see the results of including the `body` by adding this along with the other fields in search.json:
I've found that including the `body` field in the search creates too many problems, and so I've removed `body` from the search. You can see the results of including the `body` by adding this along with the other fields in search.json:
{% raw %}
```json
@ -114,6 +115,6 @@ Where you see `{url}` and `{title}`, the search is retrieving the values for the
## More robust search
For more robust search, consider integrating either [Algolia](http://algolia.com) or [Swifttype](http://swiftype.com).
Overall, the built-in search only works for small documentation projects. If you have more robust search needs, consider integrating [Google Custom Search](https://cse.google.com/cse/), [Algolia](http://algolia.com), or [Swifttype](http://swiftype.com).
{% include links.html %}