Skip to content

1.38.0

Compare
Choose a tag to compare
@Wolfr Wolfr released this 22 Jun 12:10
· 67 commits to master since this release
  • Add noIndex option to overall config which controls meta tag used to signify to search engines whether to index or not
  • Change main template to be an empty template ready for customization, instead of an index of pages. Index is still available at page-index.html.
  • Optimize templates so that the default markup in Bedrock with the right flags looks like this:
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bedrock
    </title>
    <link rel="stylesheet" href="/css/main.css">
</head>
<body>
    <p>Welcome to Bedrock. This is your homepage. Go to <code>/content/templates/index.pug</code> to find this file and start editing your project.</p>
    <script src="/js/bundle-client.js"></script>
</body>
</html>

The flags you need in bedrock.config.prod.js are:

/**
 * Bedrock production configuration
 * ---
 * This object will get merged into the bedrock config object and contains specific values for production
 * Use `NODE_ENV=production npm run build` to run a production build
*/

module.exports = {
  noIndex: false,
  pageTree: false,
  styleguide: false,
  js: {
    minify: true
  },
  css: {
    minify: true,
    purge: true,
    compiler: 'scss'
  },
};

This will give you a minimal setup in the build where we never load the big JS file to make the prototype work (the one that contains jQuery (legacy code), Codemirror for syntax highlighting etc.).