Skip to content

Commit

Permalink
v2.9.3 updates!
Browse files Browse the repository at this point in the history
- remove even more trailing slashes
- add descriptions to *almost* all pages
- append "Page" to the `<title>` of paginated paths
- remove `<form>` block from search bar
- add `--minify-js true` to html-minifier script
  • Loading branch information
citrusui committed Aug 20, 2017
1 parent 21c0c73 commit 0a27bf5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion 404.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Page Not Found
permalink: 404.html
description: "404: Page not found"
---

# 404: Page not found
Expand Down
3 changes: 1 addition & 2 deletions _config.dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
permalink: pretty
host: 0.0.0.0
author: Avery Magnotti
alias: citrusui
Expand Down Expand Up @@ -40,4 +39,4 @@ gems:
- jekyll-redirect-from
- jekyll-sitemap
paginate: 4
paginate_path: "/blog/page/:num/"
paginate_path: "/blog/page/:num"
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
permalink: pretty
incremental: true
author: Avery Magnotti
alias: citrusui
Expand Down
14 changes: 11 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@
<meta property="og:description" content="{{ page.description }}">
<meta property="og:image" content="{{ site.url }}/apple-touch-icon.png">
<meta property="og:title" content="{% if page.title == 'main' %}{{ site.alias }}{% elsif page.blog %}{{ site.alias }} blog{% else %}{{ page.title }} | {{ site.alias }}{% endif %}">
<meta property="og:url" content="{{ site.url }}">
<meta property="og:url" content="{{ site.url }}{{ page.url | remove: '.html' }}">
<link rel="apple-touch-icon" href="{{ site.url }}/apple-touch-icon.png">
<link rel="canonical" href="{{ site.url }}">
<link rel="canonical" href="{{ site.url }}{{ page.url | remove: '.html' }}">
<link rel="icon" href="{{ site.url }}/favicon.ico">
<link rel="mask-icon" href="{{ site.url }}/mask-icon.svg" color="{{ site.brand_color }}">
{% capture poole %}
{% include poole/scss/poole.scss %}
{% endcapture %}
<style>{{ poole | scssify }}</style>
<title>
{% if page.title == "main" %}{{ site.alias }}{% elsif page.blog %}{{ site.alias }} blog{% else %}{{ page.title }} | {{ site.alias }}{% endif %}
{% if page.title == "main" %}
{{ site.alias }}
{% elsif paginator.page > 1 %}
{{ site.alias }} blog | Page {{ paginator.page }}
{% elsif page.blog %}
{{ site.alias }} blog
{% else %}
{{ page.title }} | {{ site.alias }}
{% endif %}
</title>
</head>
8 changes: 4 additions & 4 deletions _includes/javascript.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script>document.addEventListener('touchstart', function() {});</script>

<script>
var i = document.getElementsByTagName('img');
for (var x = 0; x < i.length; x++) {
i[x].classList.add('lazyload');
var img = document.getElementsByTagName('img');
for (var num = 0; num < img.length; num++) {
img[num].classList.add('lazyload');
}
</script>

Expand All @@ -14,7 +14,7 @@
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
searchResultTemplate: '<h3><a class="dropdown-item" href="{url}">{title}</a></h3>',
noResultsText: '<h3 class="message">No results found.</h3>',
noResultsText: '<h4 class="message">No results found.</h4>',
json: '/search.json'
});
</script>
Expand Down
4 changes: 1 addition & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
</nav>

<div class="container">
<form>
<input class="search" type="search" id="search-input" placeholder="Search…" autocomplete="off">
<input class="search" type="search" id="search-input" placeholder="Search posts…" autocomplete="off">
<div id="search-results"></div>
</form>
</div>

<div class="container content">
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3>Recent posts</h3>
<ul class="related-posts">
{% for post in site.related_posts limit:3 %}
<li>
<a href="{{ site.url }}{{ post.url }}">
<a href="{{ site.url }}{{ post.url | remove: '.html' }}">
{{ post.title }}
<small>
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time>
Expand Down
4 changes: 0 additions & 4 deletions about.md

This file was deleted.

5 changes: 3 additions & 2 deletions blog/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
layout: default
blog: true
description: "Blog posts by Avery Magnotti."
---

<div class="posts">
{% for post in paginator.posts %}
<div class="post-preview">
<h1 class="post-title">
<a href="{{ post.url }}">{{ post.title }}</a>
<a href="{{ post.url | remove: '.html' }}">{{ post.title }}</a>
</h1>
{% include time.html %}
{{ post.content | markdownify | split:'<null>' | first }}
{% if post.content contains '<null>' %}
<p><a href="{{ post.url }}">Read more…</a></p>
<p><a href="{{ post.url | remove: '.html' }}">Read more…</a></p>
{% endif %}
</div>
{% endfor %}
Expand Down
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: main
description: The official website of Avery Magnotti.
---

# Avery Magnotti
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "citrusui.me",
"version": "2.9.2",
"version": "2.9.3",
"description": "The clean and simple website of Avery Magnotti.",
"repository": {
"type": "git",
"url": "git+https://github.com/citrusui/me.git"
},
"scripts": {
"clean": "rm -rf _site/",
"dev": "bundle exec jekyll serve --config _config.dev.yml",
"dev": "npm run clean && bundle exec jekyll serve --config _config.dev.yml",
"firebase": "npm run clean && npm run prod && npx firebase deploy",
"jekyll": "bundle exec jekyll build",
"lint": "npx sass-lint -c .sass-lint.yml \"_sass/*.scss\" -v -q",
"min": "npx html-minifier --input-dir _site/ --output-dir _site/ --file-ext html --html5 --collapse-whitespace",
"min": "npx html-minifier --input-dir _site/ --output-dir _site/ --file-ext html --html5 --minify-js true --collapse-whitespace",
"prod": "export JEKYLL_ENV=production && npm run jekyll && npm run min",
"prepublishOnly": "npm run clean && npm run lint && npm run prod && npx firebase deploy"
},
Expand Down
5 changes: 3 additions & 2 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
{% for post in site.posts %}
{
"title": "{{ post.title | escape }}",
"tags": "{{ post.tags | join: ', ' }}",
"url": "{{ post.url }}"
"tags": "{{ post.tags | join: ' ' }}",
"url": "{{ post.url | remove: '.html' }}",
"date": "{{ post.date }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]

0 comments on commit 0a27bf5

Please sign in to comment.