Clean tags with _document.js

From the start when I used Next JS, I just hated the way the tags was generated. Unorganized, with classnames and other irrelevante stuff. By extending the _document.js and _app.js I could change the default behaviour of the rendering. Every tag is now how it surposed to be. See the changes here Of cource you can hit F12 to se the result directly.

        <meta charSet="utf-8" />
        {props.meta.title && <title>{props.meta.title}</title>}
        {props.meta.description && <meta name="description" 
            content={props.meta.description} />}
        <meta name="keywords" content={keywords()} />

Created by Bootproject editor on 2019-08-13

  • multi


    The Swede(me), Rickard Magnusson a Senior Software Engineer, currently employeed as a freelance consultant in Norway.

  • Legal and is property of Bootproject and may be used under (MIT)licence . See project on Bitbucket

  • Logo Contact


(©) Copyright 2020