Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created August 25, 2013 17:42
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ttscoff/6335218 to your computer and use it in GitHub Desktop.
Save ttscoff/6335218 to your computer and use it in GitHub Desktop.
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