diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..edc55ce --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "snyk.advanced.autoSelectOrganization": true +} \ No newline at end of file diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png new file mode 100644 index 0000000..2a24b98 Binary files /dev/null and b/static/apple-touch-icon.png differ diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..c408fe5 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/images/favicon-16x16.png b/static/images/favicon-16x16.png new file mode 100644 index 0000000..e7ae230 Binary files /dev/null and b/static/images/favicon-16x16.png differ diff --git a/static/images/favicon-192x192.png b/static/images/favicon-192x192.png new file mode 100644 index 0000000..da20056 Binary files /dev/null and b/static/images/favicon-192x192.png differ diff --git a/static/images/favicon-32x32.png b/static/images/favicon-32x32.png new file mode 100644 index 0000000..2ce9957 Binary files /dev/null and b/static/images/favicon-32x32.png differ diff --git a/static/images/favicon-512x512.png b/static/images/favicon-512x512.png new file mode 100644 index 0000000..106745e Binary files /dev/null and b/static/images/favicon-512x512.png differ diff --git a/static/site.webmanifest b/static/site.webmanifest new file mode 100644 index 0000000..9088253 --- /dev/null +++ b/static/site.webmanifest @@ -0,0 +1,12 @@ +{ + "name": "Thoughts and Musings", + "short_name": "andwati.com", + "icons": [ + { "src": "/images/favicon-192x192.png", "sizes": "192x192", "type": "image/png" }, + { "src": "/images/favicon-512x512.png", "sizes": "512x512", "type": "image/png" } + ], + "theme_color": "#131311", + "background_color": "#131311", + "display": "standalone", + "start_url": "/" +} diff --git a/templates/archive.html b/templates/archive.html index 58cb18a..4b2adbd 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -1,5 +1,9 @@ {% extends "base.html" %} {% block title %}{{ section.title }} | {{ config.title }}{% endblock title -%} {% block content %} +%} {% block description %}Chronological archive of every post on {{ config.title }}.{% endblock +description %} {% block canonical %}{{ section.permalink }}{% endblock canonical %} {% block og_title +%}{{ section.title }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Chronological +archive of every post on {{ config.title }}.{% endblock og_description %} {% block og_url %}{{ +section.permalink }}{% endblock og_url %} {% block content %}

{{ config.extra.archive_page_title | default(value="Archive") }}

diff --git a/templates/base.html b/templates/base.html index 2bf52e3..1b73037 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,6 +7,14 @@ + + + + + + + + @@ -56,21 +64,21 @@ "@graph": [ { "@type": "WebSite", - "@id": "{{ config.base_url }}/#website", - "url": "{{ config.base_url }}/", - "name": "{{ config.title }}", - "description": "{{ config.description }}", + "@id": "{{ config.base_url | safe }}/#website", + "url": "{{ config.base_url | safe }}/", + "name": {{ config.title | json_encode | safe }}, + "description": {{ config.description | json_encode | safe }}, "inLanguage": "en-US" }, { "@type": "Person", - "@id": "{{ config.base_url }}/#author", - "name": "{{ config.extra.author | default(value="andwati") }}", - "url": "{{ config.base_url }}/about/", + "@id": "{{ config.base_url | safe }}/#author", + "name": {{ config.extra.author | default(value="andwati") | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/about/", "sameAs": [ - {% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %} - {% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% if config.extra.youtube_url %},{% endif %}{% endif %} - {% if config.extra.youtube_url %}"{{ config.extra.youtube_url }}"{% endif %} + {% if config.extra.github_url %}"{{ config.extra.github_url | safe }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %} + {% if config.extra.twitter_url %}"{{ config.extra.twitter_url | safe }}"{% if config.extra.youtube_url %},{% endif %}{% endif %} + {% if config.extra.youtube_url %}"{{ config.extra.youtube_url | safe }}"{% endif %} ] } ] diff --git a/templates/index.html b/templates/index.html index 384ae8d..185062a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,23 +5,24 @@ block og_url %}{{ config.base_url }}/{% endblock og_url %} {% block head %} { "@context": "https://schema.org", "@type": "Blog", - "@id": "{{ config.base_url }}/#blog", - "name": "{{ config.title }}", - "description": "{{ config.description }}", - "url": "{{ config.base_url }}/", + "@id": "{{ config.base_url | safe }}/#blog", + "name": {{ config.title | json_encode | safe }}, + "description": {{ config.description | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/", "inLanguage": "en-US", "author": { "@type": "Person", - "@id": "{{ config.base_url }}/#author" + "@id": "{{ config.base_url | safe }}/#author" }, "blogPost": [ {% set section = get_section(path="posts/_index.md") %} {% for page in section.pages %} { "@type": "BlogPosting", - "@id": "{{ page.permalink }}#article", - "headline": {{ page.title | json_encode }}, - "url": "{{ page.permalink }}" + "@id": "{{ page.permalink | safe }}#article", + "headline": {{ page.title | json_encode | safe }}, + "image": "{{ config.base_url | safe }}/images/og-image.png", + "url": "{{ page.permalink | safe }}" {% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %} }{% if not loop.last %},{% endif %} {% endfor %} diff --git a/templates/page.html b/templates/page.html index b3c457d..194dd58 100644 --- a/templates/page.html +++ b/templates/page.html @@ -30,37 +30,38 @@ { "@context": "https://schema.org", "@type": "BlogPosting", - "@id": "{{ page.permalink }}#article", + "@id": "{{ page.permalink | safe }}#article", "mainEntityOfPage": { "@type": "WebPage", - "@id": "{{ page.permalink }}" + "@id": "{{ page.permalink | safe }}" }, - "headline": {{ page.title | json_encode }}, - "description": {{ page.description | default(value=config.description) | json_encode }}, - "url": "{{ page.permalink }}", + "headline": {{ page.title | json_encode | safe }}, + "description": {{ page.description | default(value=config.description) | json_encode | safe }}, + "image": "{{ config.base_url | safe }}/images/og-image.png", + "url": "{{ page.permalink | safe }}", "inLanguage": "en-US", {% if page.date %}"datePublished": "{{ page.date | date(format="%+") }}",{% endif %} {% if page.updated %}"dateModified": "{{ page.updated | date(format="%+") }}",{% else %}{% if page.date %}"dateModified": "{{ page.date | date(format="%+") }}",{% endif %}{% endif %} "author": { "@type": "Person", - "@id": "{{ config.base_url }}/#author", - "name": "{{ config.extra.author | default(value="andwati") }}", - "url": "{{ config.base_url }}/about/" + "@id": "{{ config.base_url | safe }}/#author", + "name": {{ config.extra.author | default(value="andwati") | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/about/" }, "publisher": { "@type": "Person", - "@id": "{{ config.base_url }}/#author", - "name": "{{ config.extra.author | default(value="andwati") }}", - "url": "{{ config.base_url }}/about/" + "@id": "{{ config.base_url | safe }}/#author", + "name": {{ config.extra.author | default(value="andwati") | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/about/" }, "isPartOf": { "@type": "Blog", - "@id": "{{ config.base_url }}/#blog", - "name": "{{ config.title }}", - "url": "{{ config.base_url }}/" + "@id": "{{ config.base_url | safe }}/#blog", + "name": {{ config.title | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/" } {% if page.taxonomies.tags %} - ,"keywords": [{% for tag in page.taxonomies.tags %}"{{ tag }}"{% if not loop.last %},{% endif %}{% endfor %}] + ,"keywords": [{% for tag in page.taxonomies.tags %}{{ tag | json_encode | safe }}{% if not loop.last %},{% endif %}{% endfor %}] {% endif %} } diff --git a/templates/partials/head.html b/templates/partials/head.html index 2822740..2fa0daa 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -47,29 +47,29 @@ "@graph": [ { "@type": "WebSite", - "@id": "{{ config.base_url }}/#website", - "url": "{{ config.base_url }}/", - "name": "{{ config.title }}", - "description": "{{ config.description }}", + "@id": "{{ config.base_url | safe }}/#website", + "url": "{{ config.base_url | safe }}/", + "name": {{ config.title | json_encode | safe }}, + "description": {{ config.description | json_encode | safe }}, "inLanguage": "en-US", "potentialAction": { "@type": "SearchAction", "target": { "@type": "EntryPoint", - "urlTemplate": "{{ config.base_url }}/posts?q={search_term_string}" + "urlTemplate": "{{ config.base_url | safe }}/posts?q={search_term_string}" }, "query-input": "required name=search_term_string" } }, { "@type": "Person", - "@id": "{{ config.base_url }}/#author", - "name": "{{ config.extra.author | default(value="andwati") }}", - "url": "{{ config.base_url }}/about/", + "@id": "{{ config.base_url | safe }}/#author", + "name": {{ config.extra.author | default(value="andwati") | json_encode | safe }}, + "url": "{{ config.base_url | safe }}/about/", "sameAs": [ - {% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %} - {% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% if config.extra.youtube_url %},{% endif %}{% endif %} - {% if config.extra.youtube_url %}"{{ config.extra.youtube_url }}"{% endif %} + {% if config.extra.github_url %}"{{ config.extra.github_url | safe }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %} + {% if config.extra.twitter_url %}"{{ config.extra.twitter_url | safe }}"{% if config.extra.youtube_url %},{% endif %}{% endif %} + {% if config.extra.youtube_url %}"{{ config.extra.youtube_url | safe }}"{% endif %} ] } ] diff --git a/templates/posts.html b/templates/posts.html index 0ad5a1c..7b528bb 100644 --- a/templates/posts.html +++ b/templates/posts.html @@ -9,27 +9,29 @@ og_description %}{{ config.extra.posts_page_subtitle | default(value="Exploring }}/{% endif %}{% endblock og_url %} {% block head %} {% set posts_page_title = config.extra.posts_page_title | default(value="Posts") %} {% set posts_page_subtitle = config.extra.posts_page_subtitle | default(value="Exploring binary exploitation, reverse engineering, and offensive security.") %} +{% set posts_ld_name = posts_page_title ~ " | " ~ config.title %} diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index 3c37a21..f0ae0eb 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -4,27 +4,30 @@ description %} {% block canonical %}{{ term.permalink }}{% endblock canonical %} %}Tag: {{ term.name }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Posts tagged "{{ term.name }}" on {{ config.title }}{% endblock og_description %} {% block og_url %}{{ term.permalink }}{% endblock og_url %} {% block head %} +{% set tag_ld_name = 'Posts tagged "' ~ term.name ~ '" | ' ~ config.title %} +{% set tag_ld_description = 'Posts tagged "' ~ term.name ~ '" on ' ~ config.title %}