-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da98143
commit 8ac9b24
Showing
6 changed files
with
555 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,56 +58,36 @@ remote_theme: JakeSteam/[email protected] | |
# Basic site setup | ||
description: In-depth ad-free articles about software development, Android, and the internet | ||
accent_colour: "#2a7ae2" | ||
url: https://blog.jakelee.co.uk | ||
url: https://jonesrussell.github.io | ||
|
||
# Optional native feature customisation (delete to turn off) | ||
table_of_contents_header: "Jump to:" | ||
post_end_promo: <i><b>Enjoyed this article? You'll like "<a href="https://jakeweeklee.substack.com">Jake Week Lee</a>", a newsletter of articles & online things!</b></i> | ||
google_analytics: G-99X0QYL39T | ||
|
||
network: | ||
- { name: Programming, url: "https://blog.jakelee.co.uk", colour: "#2a7ae2" } | ||
- { | ||
name: Internet History, | ||
url: "https://history.jakelee.co.uk", | ||
colour: "#075e78", | ||
} | ||
- { name: Theme, url: "https://minima.jakelee.co.uk", colour: "#951A00" } | ||
- { | ||
name: Fragments, | ||
url: "https://fragments.jakelee.co.uk", | ||
colour: "#ad33a9", | ||
} | ||
- { name: Everything Else, url: "https://jakelee.co.uk", colour: "#acacac" } | ||
google_analytics: G-9999999 | ||
|
||
# Social / dark mode settings | ||
minima: | ||
skin: auto | ||
social_links: | ||
- { platform: github, user_url: "https://github.com/JakeSteam" } | ||
- { platform: linkedin, user_url: "https://www.linkedin.com/in/Jake-Lee" } | ||
- { platform: github, user_url: "https://github.com/jonesrussell" } | ||
- { platform: linkedin, user_url: "https://www.linkedin.com/in/jonesrussell42" } | ||
- { | ||
platform: stackoverflow, | ||
user_url: "https://stackoverflow.com/users/608312/Jake-Lee", | ||
user_url: "https://stackoverflow.com/users/437654/russell", | ||
} | ||
- { platform: x, user_url: "https://www.twitter.com/JakeLeeUK" } | ||
- { platform: x, user_url: "https://www.x.com/jonesrussell" } | ||
- { | ||
platform: email, | ||
user_url: "mailto:[email protected]", | ||
user_title: "[email protected]", | ||
user_url: "mailto:[email protected]", | ||
user_title: "[email protected]", | ||
} | ||
- { | ||
platform: code, | ||
user_url: "https://github.com/JakeSteam/blog-programming", | ||
user_url: "https://github.com/jonesrussell/blog", | ||
user_title: "JakeSteam/blog-programming", | ||
} | ||
- { platform: rss, user_url: "/feed.xml", user_title: "RSS Feed" } | ||
- { | ||
platform: substack, | ||
user_url: "https://jakeweeklee.substack.com/", | ||
user_title: "Jake Week Lee", | ||
} | ||
# - { platform: devto, user_url: "https://dev.to/jekyll" } | ||
- { platform: rss, user_url: "/feed.xml", user_title: "RSS Feed" } | ||
- { platform: devto, user_url: "https://dev.to/jonesrussell" } | ||
# - { platform: dribbble, user_url: "https://dribbble.com/jekyll" } | ||
# - { platform: facebook, user_url: "https://www.facebook.com/jekyll" } | ||
# - { platform: flickr, user_url: "https://www.flickr.com/photos/jekyll" } | ||
|
@@ -117,7 +97,7 @@ minima: | |
# - { platform: microdotblog, user_url: "https://micro.blog/jekyll" } | ||
# - { platform: pinterest, user_url: "https://www.pinterest.com/jekyll" } | ||
# - { platform: telegram, user_url: "https://t.me/jekyll" } | ||
# - { platform: youtube, user_url: "https://www.youtube.com/jekyll" } | ||
- { platform: youtube, user_url: "https://www.youtube.com/@fullstackdev42" } | ||
|
||
### | ||
# Below here probably doesn't need changing # | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<form id="searchform"> | ||
<p> | ||
<input | ||
type="search" | ||
id="search-input" | ||
class="form-control" | ||
name="q" | ||
value="" | ||
autofocus | ||
/> | ||
</p> | ||
</form> | ||
<ul id="searchresults" class="post-list"></ul> | ||
|
||
<script src="{{site.baseurl}}/assets/js/search.js" type="text/javascript"></script> | ||
|
||
<script> | ||
var sjs = SimpleJekyllSearch({ | ||
searchInput: document.getElementById("searchform"), | ||
resultsContainer: document.getElementById("searchresults"), | ||
json: "{{site.baseurl}}/assets/js/posts.json", | ||
templateMiddleware: function (prop, value, template) { | ||
if (prop === "title" || prop === "excerpt") { | ||
value = value.replace(/&/g, "&"); | ||
} | ||
if (prop === "url") { | ||
return value; | ||
} | ||
return value.replace( | ||
new RegExp(document.getElementById("search-input").value, "gi"), | ||
'<span class="highlight">$&</span>' | ||
); | ||
}, | ||
sortMiddleware: function (a, b) { | ||
aPrio = matchPriority(a.matchedField); | ||
bPrio = matchPriority(b.matchedField); | ||
return bPrio - aPrio; | ||
}, | ||
searchResultTemplate: | ||
"<li class='card'>" + | ||
"<div class='content'>" + | ||
"<a class='post-link' href='{url}'>{title}</a>" + | ||
"<span class='post-meta'>{date} • {tags}</span>" + | ||
"<p>{excerpt}</p>" + | ||
"</div>" + | ||
"</li>", | ||
}); | ||
|
||
function matchPriority(fieldMatched) { | ||
switch (fieldMatched) { | ||
case "tags": | ||
return 5; | ||
case "title": | ||
return 4; | ||
case "excerpt": | ||
return 3; | ||
default: | ||
return 0; | ||
} | ||
} | ||
|
||
window.addEventListener( | ||
"load", | ||
function () { | ||
var searchParam = new URLSearchParams(window.location.search).get("q"); | ||
if (searchParam != null) { | ||
document.getElementById("search-input").value = searchParam; | ||
setTimeout(() => { | ||
sjs.search(searchParam); | ||
}, 100); | ||
} | ||
document.getElementById("search-input").placeholder = | ||
"Type your search here..."; | ||
}, | ||
false | ||
); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
window.onload = function() { | ||
var links = document.links; | ||
for(var i = 0; i < links.length; i++) { | ||
if (links[i].hostname != window.location.hostname || links[i].href.includes("/images/")) { | ||
links[i].target = '_blank'; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
layout: none | ||
--- | ||
[ | ||
{% for post in site.posts %} | ||
{ | ||
"tags" : "{{ post.tags | join: ', ' }}", | ||
"title" : {{ post.title | jsonify | strip_html }}, | ||
"excerpt" : {{ post.excerpt | jsonify | strip_html }}, | ||
"url" : "{{ post.url }}", | ||
"date" : "{{ post.date | date: "%b %-d, %Y" }}", | ||
"content" : {{ post.content | jsonify | strip_html }} | ||
} {% unless forloop.last %},{% endunless %} | ||
{% endfor %} | ||
] |
Oops, something went wrong.