Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Barebones nvALT template with [[linking]] built-in
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{%title%}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
{%style%}
</style>
</head>
<body>
<div id="wrapper">
<header>
<h1 class="doctitle">{%title%}</h1>
</header>
<div id="contentdiv">
{%content%}
</div>
</div> <!-- end of #container -->
<script>
window.onload = function(e){
var container = document.getElementById("wrapper");
container.innerHTML = container.innerHTML.replace(/\[\[(.*?)\]\]/g,"<a href='nvalt://find/$1'>$1</a>");
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.