Add example file.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-11-08 15:58:20 +01:00
parent 7c1aec3497
commit 805139d2ca
10 changed files with 63 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
output/

1
example/.isidore-version Normal file
View File

@ -0,0 +1 @@
0.1.0

5
example/config.php Normal file
View File

@ -0,0 +1,5 @@
<?php
$site_name = "New Project";
$site_author = "Nicolás A. Ortega Froysa";
$site_url = "http://example.com/";
?>

View 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");
?>

View File

@ -0,0 +1,4 @@
<?php
$blog_title = "My First Post";
$blog_date = "2022-11-07";
?>

View 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");
?>

View 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");
?>

View File

@ -0,0 +1 @@
A test file.

View File

@ -0,0 +1,2 @@
</body>
</html>

View File

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title><?= $title ?> | <?= $site_name?></title>
</head>
<body>
<h1><?= $title ?></h1>