Add example file.
This commit is contained in:
parent
7c1aec3497
commit
805139d2ca
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
output/
|
1
example/.isidore-version
Normal file
1
example/.isidore-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
0.1.0
|
5
example/config.php
Normal file
5
example/config.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
$site_name = "New Project";
|
||||||
|
$site_author = "Nicolás A. Ortega Froysa";
|
||||||
|
$site_url = "http://example.com/";
|
||||||
|
?>
|
23
example/site/blog.html.php
Normal file
23
example/site/blog.html.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
$title = "Blog";
|
||||||
|
include("templates/header.html.php");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Welcome to my blog page! Here's a list of my current entries:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
foreach(glob("site/blog/*.cfg.php") as $i)
|
||||||
|
{
|
||||||
|
include($i);
|
||||||
|
$entry_file = substr($i, 4, -8) . '.html';
|
||||||
|
echo "<li><a href='$entry_file'>$blog_date - $blog_title</a></li>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include("templates/footer.html.php");
|
||||||
|
?>
|
4
example/site/blog/000-first.cfg.php
Normal file
4
example/site/blog/000-first.cfg.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
$blog_title = "My First Post";
|
||||||
|
$blog_date = "2022-11-07";
|
||||||
|
?>
|
9
example/site/blog/000-first.html.php
Normal file
9
example/site/blog/000-first.html.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
include("site/blog/000-first.cfg.php");
|
||||||
|
$title = $blog_title;
|
||||||
|
include("templates/header.html.php");
|
||||||
|
?>
|
||||||
|
<p>My first blog post.</p>
|
||||||
|
<?php
|
||||||
|
include("templates/footer.html.php");
|
||||||
|
?>
|
10
example/site/index.html.php
Normal file
10
example/site/index.html.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$title = "Home";
|
||||||
|
include("templates/header.html.php");
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
Hello, World! This is an example page.
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
include("templates/footer.html.php");
|
||||||
|
?>
|
1
example/site/static-file.txt
Normal file
1
example/site/static-file.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
A test file.
|
2
example/templates/footer.html.php
Normal file
2
example/templates/footer.html.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
</body>
|
||||||
|
</html>
|
7
example/templates/header.html.php
Normal file
7
example/templates/header.html.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><?= $title ?> | <?= $site_name?></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1><?= $title ?></h1>
|
Loading…
Reference in New Issue
Block a user