Skip to content

Commit

Permalink
ensuring that api and feeds are not included in search results (#794)
Browse files Browse the repository at this point in the history
* ensuring that api and feeds are not included in search results
* event buttons page should not be included

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Apr 19, 2022
1 parent 170806e commit 72afc41
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ excluded_in_search: true
if (results.length) {
var resultsHTML = "";
results.forEach(function (result) {
console.log(result)
var item = window.data[result.ref],
contentPreview = getPreview(query, item.content, 170),
titlePreview = getPreview(query, item.title);
Expand Down
1 change: 1 addition & 0 deletions feed.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: null
excluded_in_search: true
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions pages/api/events.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: none
permalink: /api/events.json
excluded_in_search: true
---
{% assign events = site.events | sort: "expires" | reverse %}[{% for event in events %}
{
Expand Down
1 change: 1 addition & 0 deletions pages/api/jobs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: none
permalink: /api/jobs.json
excluded_in_search: true
---
{% assign sorted_jobs = site.data.jobs | sort: "posted" | reverse %}[{% for job in sorted_jobs %}{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}{% capture expires %}{{ job.expires | date: '%s'}}{% endcapture %}{% capture posted %}{{ job.posted | date: '%b %d, %Y'}}{% endcapture %}{% if expires > nowunix %}{
"title": {{ job.name | jsonify }},
Expand Down
1 change: 1 addition & 0 deletions pages/api/member-counts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: none
permalink: /api/member-counts.json
excluded_in_search: true
---
{% assign member_counts = site.data.memberCounts | sort: "Total" | reverse %}[{% for entry in member_counts %}{
"date": "{{ entry.Date }}",
Expand Down
1 change: 1 addition & 0 deletions pages/api/newsletters.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: none
permalink: /api/newsletters.json
excluded_in_search: true
---
{% assign posts = site.posts | where: "category", "newsletter" %}[{% for post in posts %}
{
Expand Down
1 change: 1 addition & 0 deletions pages/api/posts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: none
permalink: /api/posts.json
excluded_in_search: true
---
[{% for post in site.posts %}
{
Expand Down
1 change: 1 addition & 0 deletions pages/events/archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: page
title: Events Archive
description: Archive of events, organized by year
permalink: /events/archive/
excluded_in_search: true
---

<div class="row">
Expand Down
1 change: 1 addition & 0 deletions pages/events/calendar-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ permalink: /programme/calendar-buttons/
sidebar:
nav: programme
fullcalendar: true
excluded_in_search: true
---

{% assign events = '' | split: '' %}
Expand Down
1 change: 1 addition & 0 deletions pages/feeds/dei.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: null
permalink: /feeds/dei.xml
excluded_in_search: true
---
{% assign events = site.events | sort: "expires" | where: "category", "dei" | reverse %}<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions pages/feeds/events.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: null
permalink: /feeds/events.xml
excluded_in_search: true
---
{% assign events = site.events | sort: "expires" | reverse %}<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions pages/feeds/jobs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: null
permalink: /feeds/jobs.xml
excluded_in_search: true
---
{% assign sorted_jobs = site.data.jobs | sort: "posted" | reverse %}<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions pages/feeds/member-counts.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: null
permalink: /feeds/member-counts.xml
excluded_in_search: true
---
{% assign member_counts = site.data.memberCounts | sort: "Total" | reverse %}<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions pages/feeds/newsletters.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: null
permalink: /feeds/newsletters.xml
excluded_in_search: true
---
{% assign newsletters = site.posts | where: "category", "newsletter" %}<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
Expand Down

0 comments on commit 72afc41

Please sign in to comment.