master
Dave Winer 8 years ago
parent 472179ecab
commit 2acfb2430d

@ -88,6 +88,10 @@ There will always be more work to do here. ;-)
#### Updates
##### v0.71 7/31/16 by DW
The repository now includes mdTemplate.txt in the prefs folder. Previously it would download this file from one of my sites the first time it was used. This is a more modern way to distribute it.
##### v0.70 12/8/15 by DW
It used to be that a file had to exist in order for you to redirect from it in <a href="https://github.com/scripting/pagepark#v067-73015-by-dw">config.redirects</a>. Now it doesn't have to exist.

@ -2,7 +2,7 @@
Websites evolve over time, and PagePark has features that help you adjust things so links keep working after the change. Some of the features described on this page are here to help you prevent linkrot! That's how prevalent it is.
Another thing you want to do is pass the content through various processors. The file extensions control that. So if a file name ends with .md, it is passed through the Markdown processor. If it's .js, it's assumed to contain JavaScript code, and that code is run, and the value it returns is what we return. You can also control whether or not the scripts run.
Another thing you'll want to do is pass the content through various processors. The file extensions control that. So if a file name ends with .md, it is passed through the Markdown processor. If it's .js, it's assumed to contain JavaScript code, and that code is run, and the value it returns is what we return. You can also control whether or not the scripts run.
#### config.json
@ -184,3 +184,9 @@ Example:
}</pre>
#### The template for Markdown files
There's a special template used for rendering Markdown files. It defines the shell in which the Markdown text is included in to create the HTML file. You can position the text, or add CSS styles or script code in the template.
Here's the template we use on our demo site.

@ -0,0 +1,43 @@
<html>
<head>
<title>[%title%]</title>
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
<link href="http://fargo.io/code/bootstrap.css" rel="stylesheet">
<script src="http://fargo.io/code/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://fargo.io/code/fontAwesome/css/font-awesome.min.css"/>
<link href="http://fargo.io/code/ubuntuFont.css" rel="stylesheet" type="text/css">
<script>
function everySecond () {
}
function startup () {
console.log ("startup");
self.setInterval (function () {everySecond ()}, 1000);
}
</script>
<style>
body {
font-family: "Ubuntu";
font-size: 18px;
line-height: 140%;
background-color: whitesmoke;
}
.divPageBody {
width: 60%;
margin-top: 90px;
margin-left: auto;
margin-right: auto;
margin-bottom: 400px;
}
</style>
</head>
<body>
<div class="divPageBody">
[%bodytext%]
</div>
<script>
$(document).ready (function () {
startup ();
});
</script>
</body>
</html>
Loading…
Cancel
Save