dashdev-website/build/article/gotchas/index.html
2020-03-06 19:44:46 +01:00

129 lines
No EOL
3.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gotchas - dashdevs-suite</title>
<meta name="description" content="Issues and workarounds when using Metalsmith." />
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width,shrink-to-fit=no,user-scalable=no,initial-scale=1,minimum-scale=1,minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<link rel="stylesheet" media="all" href="../../css/styles.css" />
</head>
<body>
<header>
<div class="content">
<p class="logo"><a href="../../">dashdevs-suite</a></p>
<!-- main navigation -->
<nav class="nav main">
<ul>
<li>
<a href="../../">Home</a>
</li>
<li>
<a href="../../docs/">docs</a>
</li>
<li>
<a href="../../article/" class="active">Articles</a>
</li>
<li>
<a href="../../tutorials/">tutorials</a>
</li>
<li>
<a href="../../boxes/">boxes</a>
</li>
<li>
<a href="../../contact/">Contact</a>
</li>
</ul>
</nav>
</div>
</header>
<main class="subpages" >
<div class="content">
<!-- sub navigation -->
<nav class="nav sub">
<ul>
<li>
<a href="../../article/usage/">Usage options</a>
</li>
<li>
<a href="../../article/gotchas/">Gotchas</a>
</li>
<li>
<a href="../../article/gulp/">Gulp</a>
</li>
<li>
<a href="../../article/future/">Future publication</a>
</li>
</ul>
</nav>
<article>
<h1>Gotchas</h1>
<p class="articleinfo">Published 10 March 2016, 127 words, 1-minute read</p>
<p>Not everything is necessarily straight-forward in the Metalsmith world&hellip;</p>
<h2 id="incompatible-plugins">Incompatible plugins</h2>
<p>Some plugins clash with another. For example, <a href="https://github.com/radiovisual/metalsmith-rootpath">metalsmith-rootpath</a> which calculates relative roots does not play nicely with <a href="https://github.com/segmentio/metalsmith-permalinks">metalsmith-permalinks</a> which creates custom folder structures.</p>
<p><em>Note: <code>lib/metalsmith-moremeta</code> in this project sets a correct <code>root</code> variable whether permalinks are used or not.</em></p>
<h2 id="plugin-order-can-be-critical">Plugin order can be critical</h2>
<p>One plugins may depend on another or conflict if placed the wrong way around. For example, the RSS-generating <a href="https://github.com/hurrymaplelad/metalsmith-feed">metalsmith-feed</a> plugin must be called after <a href="https://github.com/superwolff/metalsmith-layouts">metalsmith-layouts</a> to ensure <code>rss.xml</code> is not generated within a page template.</p>
<h2 id="browsersync-build-issues">Browsersync build issues</h2>
<p>When <a href="https://www.browsersync.io/">Browsersync</a> is running and files are edited, collections are re-parsed but the old data remains. This can cause menus and next/back links to be incorrect. To fix this, stop and restart the build.</p>
<nav class="nav page">
<ul>
<li><a href="../../article/usage/" class="back">&laquo; back: Usage options</a></li>
</p>
<li><a href="../../article/gulp/" class="next">next: Gulp &raquo;</a></li>
</p>
</ul>
</nav>
</article>
</div>
</main>
<footer>
<p>Help make this page better. <a href="https://github.com/dashdev-suite/dashdev-website/tree/master/src">Edit here >></a></p>
</footer>
</body>
</html>