Compare commits
4 Commits
39580db625
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 29257380e9 | |||
| 68a50b2c19 | |||
| 82ef78ccf9 | |||
| 8f75c0d1a0 |
40
.htaccess
Normal file
40
.htaccess
Normal file
@@ -0,0 +1,40 @@
|
||||
<IfModule mod_deflate.c>
|
||||
# Insert filters
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-php
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
|
||||
AddOutputFilterByType DEFLATE image/svg+xml
|
||||
|
||||
# Drop problematic browsers
|
||||
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
||||
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
||||
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
|
||||
|
||||
# Make sure proxies don't deliver the wrong content
|
||||
Header append Vary User-Agent env=!dont-vary
|
||||
</IfModule>
|
||||
|
||||
# BEGIN WordPress
|
||||
# Die Direktiven (Zeilen) zwischen „BEGIN WordPress“ und „END WordPress“ sind
|
||||
# dynamisch generiert und sollten nur über WordPress-Filter geändert werden.
|
||||
# Alle Änderungen an den Direktiven zwischen diesen Markierungen werden überschrieben.
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.php [L]
|
||||
</IfModule>
|
||||
|
||||
# END WordPress
|
||||
|
||||
3
INSTALL.md
Normal file
3
INSTALL.md
Normal file
@@ -0,0 +1,3 @@
|
||||
* .htaccess mit GZIP compression, für Facebook Crawler -- https://developers.facebook.com/docs/sharing/best-practices/
|
||||
* Beitragsbild auf Startseite einstellen - wird dort für OG:image verwendet
|
||||
* Plugin in WordPress installieren
|
||||
@@ -109,6 +109,7 @@ final class Ruady_OG_Head {
|
||||
$site_url = site_url();
|
||||
$site_url_p = parse_url($site_url);
|
||||
$site_host = $site_url_p['host'];
|
||||
$post_url = $site_url;
|
||||
|
||||
$og_image_url = get_the_post_thumbnail_url(33, 'full');
|
||||
$description = self::$page_headline;
|
||||
@@ -119,11 +120,13 @@ final class Ruady_OG_Head {
|
||||
<meta name="description" content="<?php echo esc_attr( $description ); ?>">
|
||||
|
||||
<!-- Open Graph Meta Tags -->
|
||||
<meta property="og:url" content="<?php echo esc_url( $site_url ); ?>">
|
||||
<meta property="og:url" content="<?php echo esc_url( $post_url ); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="<?php echo esc_attr( $site_title ); ?>">
|
||||
<meta property="og:description" content="<?php echo esc_attr( $og_description ); ?>">
|
||||
<meta property="og:image" content="<?php echo esc_url( $og_image_url ) ?>">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
|
||||
<!-- Twitter Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
@@ -168,11 +171,14 @@ final class Ruady_OG_Head {
|
||||
<meta name="description" content="<?php echo esc_attr( $description ); ?>">
|
||||
|
||||
<!-- Open Graph Meta Tags -->
|
||||
<meta property="og:url" content="<?php echo esc_url( $site_url ); ?>">
|
||||
<meta property="og:url" content="<?php echo esc_url( $post_url ); ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="<?php echo esc_attr( $post_title ); ?> – <?php echo esc_attr( $site_title ); ?>">
|
||||
<meta property="og:description" content="<?php echo esc_attr( $og_description ); ?>">
|
||||
<meta property="og:image" content="<?php echo esc_url( $og_image_url ) ?>">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="<?php echo esc_attr( $description ); ?>">
|
||||
|
||||
<!-- Twitter Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
Reference in New Issue
Block a user