mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-07-01 20:08:55 +10:00
fix: update layout and import Chirpy template files
This commit is contained in:
14
assets/404.html
Normal file
14
assets/404.html
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
layout: page
|
||||
title: "404: Page not found"
|
||||
permalink: /404.html
|
||||
|
||||
redirect_from:
|
||||
- /norobots/
|
||||
- /assets/
|
||||
- /posts/
|
||||
---
|
||||
|
||||
{% include lang.html %}
|
||||
|
||||
<p class="lead">{{ site.data.locales[lang].not_found.statment }}</p>
|
10
assets/css/jekyll-theme-chirpy.scss
Normal file
10
assets/css/jekyll-theme-chirpy.scss
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
---
|
||||
|
||||
@import 'main
|
||||
{%- if jekyll.environment == 'production' -%}
|
||||
.bundle
|
||||
{%- endif -%}
|
||||
';
|
||||
|
||||
/* append your custom style below */
|
61
assets/feed.xml
Normal file
61
assets/feed.xml
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
layout: compress
|
||||
permalink: /feed.xml
|
||||
# Atom Feed, reference: https://validator.w3.org/feed/docs/atom.html
|
||||
---
|
||||
|
||||
{% capture source %}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<id>{{ "/" | absolute_url }}</id>
|
||||
<title>{{ site.title }}</title>
|
||||
<subtitle>{{ site.description }}</subtitle>
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<author>
|
||||
<name>{{ site.social.name }}</name>
|
||||
<uri>{{ "/" | absolute_url }}</uri>
|
||||
</author>
|
||||
<link rel="self" type="application/atom+xml" href="{{ page.url | absolute_url }}"/>
|
||||
<link rel="alternate" type="text/html" hreflang="{{ site.alt_lang | default: site.lang }}"
|
||||
href="{{ '/' | absolute_url }}"/>
|
||||
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
|
||||
<rights> © {{ 'now' | date: '%Y' }} {{ site.social.name }} </rights>
|
||||
<icon>{{ site.baseurl }}/assets/img/favicons/favicon.ico</icon>
|
||||
<logo>{{ site.baseurl }}/assets/img/favicons/favicon-96x96.png</logo>
|
||||
|
||||
{% for post in site.posts limit: 5 %}
|
||||
{% assign post_absolute_url = post.url | absolute_url %}
|
||||
<entry>
|
||||
<title>{{ post.title }}</title>
|
||||
<link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
|
||||
<published>{{ post.date | date_to_xmlschema }}</published>
|
||||
{% if post.last_modified_at %}
|
||||
<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>
|
||||
{% else %}
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
{% endif %}
|
||||
<id>{{ post_absolute_url }}</id>
|
||||
<content src="{{ post_absolute_url }}" />
|
||||
<author>
|
||||
<name>{{ post.author | default: site.social.name }}</name>
|
||||
</author>
|
||||
|
||||
{% if post.categories %}
|
||||
{% for category in post.categories %}
|
||||
<category term="{{ category }}" />
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if post.summary %}
|
||||
<summary>{{ post.summary | strip }}</summary>
|
||||
{% else %}
|
||||
<summary>
|
||||
{% include no-linenos.html content=post.content %}
|
||||
{{ content | strip_html | truncate: 400 }}
|
||||
</summary>
|
||||
{% endif %}
|
||||
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
{% endcapture %}
|
||||
{{ source | replace: '&', '&' }}
|
25
assets/js/data/mathjax.js
Normal file
25
assets/js/data/mathjax.js
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
layout: compress
|
||||
# WARNING: Don't use '//' to comment out code, use '{% comment %}' and '{% endcomment %}' instead.
|
||||
---
|
||||
|
||||
{%- comment -%}
|
||||
See: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options>
|
||||
{%- endcomment -%}
|
||||
|
||||
MathJax = {
|
||||
tex: {
|
||||
{%- comment -%} start/end delimiter pairs for in-line math {%- endcomment -%}
|
||||
inlineMath: [
|
||||
['$', '$'],
|
||||
['\\(', '\\)']
|
||||
],
|
||||
{%- comment -%} start/end delimiter pairs for display math {%- endcomment -%}
|
||||
displayMath: [
|
||||
['$$', '$$'],
|
||||
['\\[', '\\]']
|
||||
],
|
||||
{%- comment -%} equation numbering {%- endcomment -%}
|
||||
tags: 'ams'
|
||||
}
|
||||
};
|
20
assets/js/data/search.json
Normal file
20
assets/js/data/search.json
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: compress
|
||||
swcache: true
|
||||
---
|
||||
|
||||
[
|
||||
{% for post in site.posts %}
|
||||
{
|
||||
"title": {{ post.title | jsonify }},
|
||||
"url": {{ post.url | relative_url | jsonify }},
|
||||
"categories": {{ post.categories | join: ', ' | jsonify }},
|
||||
"tags": {{ post.tags | join: ', ' | jsonify }},
|
||||
"date": "{{ post.date }}",
|
||||
{% include no-linenos.html content=post.content %}
|
||||
{% assign _content = content | strip_html | strip_newlines %}
|
||||
"snippet": {{ _content | truncate: 200 | jsonify }},
|
||||
"content": {{ _content | jsonify }}
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
]
|
47
assets/js/data/swconf.js
Normal file
47
assets/js/data/swconf.js
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: compress
|
||||
permalink: '/:path/swconf.js'
|
||||
# Note that this file will be fetched by the ServiceWorker, so it will not be cached.
|
||||
---
|
||||
|
||||
const swconf = {
|
||||
{% if site.pwa.cache.enabled %}
|
||||
cacheName: 'chirpy-{{ "now" | date: "%s" }}',
|
||||
|
||||
{%- comment -%} Resources added to the cache during PWA installation. {%- endcomment -%}
|
||||
resources: [
|
||||
'{{ "/assets/css/:THEME.css" | replace: ':THEME', site.theme | relative_url }}',
|
||||
'{{ "/" | relative_url }}',
|
||||
{% for tab in site.tabs %}
|
||||
'{{- tab.url | relative_url -}}',
|
||||
{% endfor %}
|
||||
|
||||
{% assign cache_list = site.static_files | where: 'swcache', true %}
|
||||
{% for file in cache_list %}
|
||||
'{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
|
||||
{% endfor %}
|
||||
],
|
||||
|
||||
interceptor: {
|
||||
{%- comment -%} URLs containing the following paths will not be cached. {%- endcomment -%}
|
||||
paths: [
|
||||
{% for path in site.pwa.cache.deny_paths %}
|
||||
{% unless path == empty %}
|
||||
'{{ path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
],
|
||||
|
||||
{%- comment -%} URLs containing the following prefixes will not be cached. {%- endcomment -%}
|
||||
urlPrefixes: [
|
||||
{% if site.analytics.goatcounter.id != nil and site.pageviews.provider == 'goatcounter' %}
|
||||
'https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/'
|
||||
{% endif %}
|
||||
]
|
||||
},
|
||||
|
||||
purge: false
|
||||
{% else %}
|
||||
purge: true
|
||||
{% endif %}
|
||||
};
|
10
assets/robots.txt
Normal file
10
assets/robots.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
permalink: /robots.txt
|
||||
# The robots rules
|
||||
---
|
||||
|
||||
User-agent: *
|
||||
|
||||
Disallow: /norobots/
|
||||
|
||||
Sitemap: {{ '/sitemap.xml' | absolute_url }}
|
Reference in New Issue
Block a user