Giter Site home page Giter Site logo

bnomei / kirby3-htmlhead Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 0.0 270 KB

Kirby Plugin for a best-practice HTML Head Element extendable with snippets

Home Page: https://forum.getkirby.com/t/kirby3-htmlhead-best-practice-html-head-element-extendable-with-snippets/23585

License: MIT License

PHP 99.61% CSS 0.23% JavaScript 0.16%
kirby3 kirby3-cms kirby3-plugin html5 head best-practice rss-feed google-analytics typekit google-webfonts

kirby3-htmlhead's Issues

Skip <base> completely

Can you please add an option to skip the addition of < base > completely?
I want to add anchor links and don't need the < base > element.
I tried it with null but it doesn't skip generating the line and still makes anchor links impossible.

    'htmlhead/base' => function ($kirby, $site, $page) {
      return ['href' => 'null'];
    },

Idea: External css / js integrity

Hey there,
I'd like to incorporate an external CSS file in 'bnomei.htmlhead.css', and while kirby3-fingerprint is installed, there's currently no option to include its integrity value.

[FAQ] Styles not applied before JS is executed โ€“ lazysizes issue

Question:
Lazysizes does not calculate size correctly. Images are all lowrez/pixelated.

Answer:
if using loadjs from this plugin you probably have to use the css and js to load the main css file and lazysizes javascript file. That way you force the browser to wait for the css to be loaded and applied before starting lazysizes.

return [
    'bnomei.htmlhead.css' => [
        '/assets/css/styles.min.css',  // <-- sharp
    ],
    'bnomei.htmlhead.js' => [
        '/assets/js/lazysizes.min.js',  // <-- sharp
    ],
    'bnomei.htmlhead.loadjs' => [
        '*' => [
            'template' => [],
            'dependencies' => [
                // '/assets/css/styles.min.css',  // <-- low-rez
                // '/assets/js/lazysizes.min.js', // <-- low-rez
                '/assets/js/main.min.js'
            ]
        ],
    ],
];

Add async scripts

Is there a way to output scripts with the async attribute?

If not can you add it?

SEO / Opengraph / Twitter cards

Hey there,
great plugin, many thanks are in order - now, it would be great to have an example how you populate SEO / Opengraph meta tags (with custom page methods etc as mentioned in README.md), like you did on your devkit page?

PR regarding some minor fixes is up and running ๐Ÿ™

// Edit: I'm open to adding twitter card support, too. And what's your standing on og:locale and og:description? being included by default?

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.