Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jdvp authored Sep 26, 2021
1 parent ef2b0eb commit f44fe18
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ See this article for more details: [Using Google Forms for Jekyll Comments, Revi

Images of all of these features can be seen in the article linked above.

### Adding to Jekyll

The baisc idea is to copy `comment-section.html` to your `_includes` folder in your Jekyll project.

Then use the following liquid statement on any page or layout template in which you want to add comments:

```liquid
{% include comment-section.html %}
```

Comments are stored with reference to the current page's url (via `page.url`), so if you have a page generated with comments and change the url later (adding a permalink or something), then it would not show the existing comments. You could update the Google Sheets to change the url though for existing commnets.

If you have some other id you want to use instead of `page.url`, update the following line inside `comment-section.html`:

```javascript
var thisPageUrl = "{{ page.url }}";
```

### Data Source

If using Google Sheets + Google Forms as described in the [original article], you should have the following items in your `_config.yml` file:
Expand Down

0 comments on commit f44fe18

Please sign in to comment.