Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Fix highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare authored and christian-fei committed Apr 8, 2021
1 parent 2df6280 commit e9c652b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
10 changes: 6 additions & 4 deletions CYPRESS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
```
# Cypress

```bash
npm i
```

run example blog with jekyll search build

```
```bash
cd example
jekyll serve
```

run cypress tests

```
```bash
npm run cypress run
# or
npm run cypress open
```
```
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Place the following code in a file called `search.json` in the **root** of your

This file will be used as a small data source to perform the searches on the client side:

```
```yaml
---
layout: none
---
Expand Down Expand Up @@ -97,7 +97,7 @@ A new instance of SimpleJekyllSearch returns an object, with the only property `

E.g.:

```
```js
var sjs = SimpleJekyllSearch({ ...options })
sjs.search('Hello')
```
Expand Down Expand Up @@ -255,7 +255,7 @@ with

If this doesn't work when using Github pages you can try `jsonify` to make sure the content is json compatible:

```
```json
"content": {{ page.content | jsonify }}
```

Expand All @@ -266,7 +266,7 @@ If this doesn't work when using Github pages you can try `jsonify` to make sure

Replace `search.json` with the following code:

```raw
```yaml
---
layout: none
---
Expand Down Expand Up @@ -306,7 +306,7 @@ layout: none

#### Acceptance tests

```
```bash
cd example; jekyll serve

# in another tab
Expand Down
8 changes: 4 additions & 4 deletions WIKI.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ on each keystroke.
- There is a filter plugin in the _plugins folder which should remove most characters that cause invalid JSON. To use it, add the simple_search_filter.rb file to your _plugins folder, and use `remove_chars` as a filter.

For example: in search.json, replace
```
```json
"content" : "{{ page.content | strip_html | strip_newlines }}"
```
with
```
```json
"content" : "{{ page.content | strip_html | strip_newlines | remove_chars | escape }}"
```

If this doesn't work when using Github pages you can try ```jsonify``` to make sure the content is json compatible:
```
```json
"content" : {{ page.content | jsonify }}
```
**Note: you don't need to use quotes ' " ' in this since ```jsonify``` automatically inserts them.**
Expand All @@ -156,7 +156,7 @@ If this doesn't work when using Github pages you can try ```jsonify``` to make s

Replace 'search.json' with the following code:

```
```yaml
---
layout: null
---
Expand Down

0 comments on commit e9c652b

Please sign in to comment.