Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Sep 10, 2023
2 parents 97b9f31 + 6f87f19 commit 6ad0a5f
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { parse, stringify } = require('himalaya');
const dateFilter = require('./src/filters/date.js');
const htmlMinTransform = require('./src/transforms/html-min-transform.js');
const Image = require('@11ty/eleventy-img');
const isProduction = process.env.NODE_ENV === 'production';
const isProduction = process.env.CONTEXT === 'production';
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const w3DateFilter = require('./src/filters/w3-date.js');
const markdownFilter = require('./src/filters/markdown.js');
Expand All @@ -21,6 +21,8 @@ module.exports = config => {
config.addPassthroughCopy('./src/js/**');
config.addPassthroughCopy('./src/font/**');
config.addPassthroughCopy('./_redirects');
config.addPassthroughCopy({ './src/img/favicon/favicon.ico': '/favicon.ico' });
config.addPassthroughCopy({ './src/robots.txt': '/robots.txt' });

config.addCollection('blog', collection => {
return [...collection.getFilteredByGlob('./src/hu/posts/*.md')];
Expand Down
7 changes: 3 additions & 4 deletions src/_includes/layout/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
<script src="/js/theme-detection.js?{{ assetHash }}"></script>
{% include "partial/preload.html" %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="alternate" type="application/rss+xml" href="{{ site.url }}/feed.xml" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{% include "partial/meta.html" %}
{% include "partial/preload.html" %}

{% set css %}
{% include "../../css/main.css" %}
Expand All @@ -21,6 +19,7 @@
</style>

{% block styles %}{% endblock %}
<script src="/js/theme-detection.js?{{ assetHash }}"></script>
</head>
<body>
<a class="btn btn--primary skip-link" href="#content">Skip to content</a>
Expand Down
40 changes: 24 additions & 16 deletions src/_includes/partial/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
{% set currentUrl = site.url + page.url %}

{% if not socialImage %}
{% set socialImage = site.url + '/img/social-share.png' %}
{% if lang == 'en' %}
{% set socialImage = site.url + '/img/social-share.png' %}
{% else %}
{% set socialImage = site.url + '/img/social-share-hu.png' %}
{% endif %}
{% else %}
{% set socialImage = site.url + socialImage %}
{% endif %}
Expand All @@ -26,27 +30,31 @@
{% endif %}

<title>{{ pageTitle }}</title>
<link rel="canonical" href="{{ currentUrl }}" />
<link rel="canonical" href="{{ currentUrl }}">

<meta name="generator" content="{{ eleventy.generator }}" />
<meta name="generator" content="{{ eleventy.generator }}">

<meta property="og:site_name" content="{{ siteTitle }}" />
<meta property="og:title" content="{{ pageTitle }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ currentUrl }}" />
<meta property="og:site_name" content="{{ siteTitle }}">
<meta property="og:title" content="{{ pageTitle }}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ currentUrl }}">

{% if socialImage %}
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:image" content="{{ socialImage }}" />
<meta name="twitter:image" content="{{ socialImage }}" />
<meta property="og:image:alt" content="Page image for {{ site.name }}" />
<meta name="twitter:image:alt" content="Page image for {{ site.name }}" />
<meta name="twitter:card" content="summary_large_image">
<meta property="og:image" content="{{ socialImage }}">
<meta name="twitter:image" content="{{ socialImage }}">
<meta property="og:image:alt" content="Page image for {{ site.name }}">
<meta name="twitter:image:alt" content="Page image for {{ site.name }}">
{% endif %}

{% if metaDesc %}
<meta name="description" content="{{ metaDesc }}" />
<meta name="twitter:description" content="{{ metaDesc }}" />
<meta property="og:description" content="{{ metaDesc }}" />
<meta name="description" content="{{ metaDesc }}">
<meta name="twitter:description" content="{{ metaDesc }}">
<meta property="og:description" content="{{ metaDesc }}">
{% endif %}

<link rel="icon" href="/img/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
<link rel="icon" type="image/svg+xml" href="/img/favicon/favicon.svg">

Binary file added src/img/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/favicon/favicon.ico
Binary file not shown.
File renamed without changes
Binary file added src/img/social-share-hu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/social-share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:

0 comments on commit 6ad0a5f

Please sign in to comment.