-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
44 lines (41 loc) · 1.34 KB
/
index.php
File metadata and controls
44 lines (41 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
# This file passes the content of the Readme.md file in the same directory
# through the Markdown filter. You can adapt this sample code in any way
# you like.
# Install PSR-0-compatible class autoloader
spl_autoload_register(function($class){
require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
});
# Get Markdown class
use \Michelf\Markdown;
# Read file and pass content through the Markdown praser
?>
<!DOCTYPE html>
<html>
<head>
<title>SCMF - Software Configuration Management Framework Specification</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="lib/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="lib/toc.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var links = [];
$('li a[id]').each(function(index, elem) {
if($(elem).text()) {
links.push( '<a href="#' + elem.id + '">' + $(elem).text() + '</a>' )
}
} );
$('#definitions').html(links.join(', '))
document.getElementById("toc").innerHTML = generateTOC(document.getElementById("content"));
})
</script>
</head>
<body>
<div id="content">
<?php
# Put HTML content in the document
echo Markdown::defaultTransform(file_get_contents('SCMF.md'));
?>
</div>
</body>
</html>