forked from thunix/wiki
Backport fixes from personal site
This commit is contained in:
parent
d28a0b3e6e
commit
7d6b375b59
|
@ -1,5 +1,5 @@
|
|||
RewriteEngine On
|
||||
RewriteRule ^$ main [QSA]
|
||||
RewriteRule ^index\.php$ wiki.php [QSA]
|
||||
RewriteCond %{REQUEST_URI} !^/includes/site.css
|
||||
RewriteRule ^index\.php$ wiki.php?page=main [QSA]
|
||||
RewriteCond %{REQUEST_URI} !(/includes/|/media)
|
||||
RewriteRule ^([^\d]+)/?$ wiki.php?page=$1 [QSA]
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
//Name of your site
|
||||
$site_name="Thunix Wiki";
|
||||
|
||||
//Root for the site, in a browser
|
||||
$site_root="/";
|
||||
|
||||
//Local base root for app files
|
||||
$doc_root="/var/www/wiki.thunix.net/";
|
||||
|
||||
?>
|
File diff suppressed because one or more lines are too long
23
wiki.php
23
wiki.php
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
include('config.php');
|
||||
|
||||
$page = $_GET['page'];
|
||||
|
||||
if ( $page == "") {
|
||||
|
@ -9,27 +11,28 @@ if ( $page == "") {
|
|||
print "<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<title>Thunix Wiki - $page</title>
|
||||
<link rel='stylesheet' type='text/css' href='/includes/site.css'>
|
||||
<title>$site_name - $page</title>
|
||||
<link rel='stylesheet' type='text/css' href='$site_root/includes/site.css'>
|
||||
</head>
|
||||
<body>";
|
||||
echo ( shell_exec("/usr/bin/pandoc includes/header.md") );
|
||||
echo ( shell_exec("/usr/bin/pandoc $doc_root/includes/header.md") );
|
||||
|
||||
print "<hr>
|
||||
print "<hr/>
|
||||
<div id='body' style='width: 90%;'>
|
||||
<div id='sidebar' style='width: 20%;float:left;'>";
|
||||
echo ( shell_exec("/usr/bin/pandoc includes/sidebar.md") );
|
||||
echo ( shell_exec("/usr/bin/pandoc $doc_root/includes/sidebar.md") );
|
||||
|
||||
print " </div>
|
||||
<div id='content' style='width: 78%; float:right;'>";
|
||||
<div id='content' style='width: 80%; float:right;'>";
|
||||
|
||||
echo ( shell_exec("/usr/bin/pandoc articles/$page.md") );
|
||||
echo ( shell_exec("/usr/bin/pandoc $doc_root/articles/$page.md") );
|
||||
|
||||
print " </div>
|
||||
</div><hr>
|
||||
<div id='footer' style='clear:both;'>";
|
||||
</div>
|
||||
<div id='footer' style='clear:both;'>
|
||||
<hr/>";
|
||||
|
||||
echo ( shell_exec("/usr/bin/pandoc includes/footer.md") );
|
||||
echo ( shell_exec("/usr/bin/pandoc $doc_root/includes/footer.md") );
|
||||
|
||||
print " </div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue