122 lines
3.6 KiB
HTML
122 lines
3.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Example Static HTML File</title>
|
|
<!-- Include static CSS file -->
|
|
<link rel="stylesheet" href="/public/styles/custom.css" />
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
}
|
|
h1 {
|
|
color: #2c3e50;
|
|
border-bottom: 2px solid #3498db;
|
|
padding-bottom: 10px;
|
|
}
|
|
.info-box {
|
|
background-color: #f8f9fa;
|
|
border: 1px solid #e9ecef;
|
|
border-radius: 5px;
|
|
padding: 15px;
|
|
margin: 20px 0;
|
|
}
|
|
.highlight {
|
|
background-color: #fff3cd;
|
|
padding: 2px 4px;
|
|
border-radius: 3px;
|
|
}
|
|
ul {
|
|
margin: 10px 0;
|
|
padding-left: 20px;
|
|
}
|
|
.footer {
|
|
margin-top: 40px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #dee2e6;
|
|
font-size: 0.9em;
|
|
color: #6c757d;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Static File Serving Example</h1>
|
|
|
|
<div class="info-box">
|
|
<p>
|
|
<strong
|
|
>This is a static HTML file served from the content/public
|
|
directory.</strong
|
|
>
|
|
</p>
|
|
<p>URL: <span class="highlight">/public/example.html</span></p>
|
|
</div>
|
|
|
|
<h2>Features</h2>
|
|
<ul>
|
|
<li>Direct file serving without processing</li>
|
|
<li>Support for various file types (HTML, images, PDFs, etc.)</li>
|
|
<li>Proper MIME type detection</li>
|
|
<li>Cache-friendly headers</li>
|
|
</ul>
|
|
|
|
<h2>Usage Examples</h2>
|
|
<p>You can access static files using these URL patterns:</p>
|
|
<ul>
|
|
<li><code>/public/example.html</code> - This HTML file</li>
|
|
<li><code>/public/images/logo.png</code> - Image files</li>
|
|
<li><code>/public/documents/manual.pdf</code> - PDF documents</li>
|
|
<li>
|
|
<code>/public/styles/custom.css</code> - CSS files (loaded
|
|
above)
|
|
</li>
|
|
<li>
|
|
<code>/public/scripts/example.js</code> - JavaScript files
|
|
(loaded below)
|
|
</li>
|
|
</ul>
|
|
|
|
<h2>File Organization</h2>
|
|
<p>
|
|
Organize your static files in the
|
|
<code>content/public</code> directory:
|
|
</p>
|
|
<pre>
|
|
content/public/
|
|
├── images/
|
|
│ ├── logo.png
|
|
│ └── banner.jpg
|
|
├── documents/
|
|
│ ├── manual.pdf
|
|
│ └── guide.docx
|
|
├── styles/
|
|
│ └── custom.css
|
|
├── scripts/
|
|
│ └── example.js
|
|
├── example.html
|
|
└── README.md
|
|
</pre
|
|
>
|
|
|
|
<div class="footer">
|
|
<p>
|
|
This file is served statically from the Rustelo content
|
|
management system.
|
|
</p>
|
|
<p>
|
|
<strong>Note:</strong> This page includes static CSS and
|
|
JavaScript files that are also served from the public directory.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Include static JavaScript file -->
|
|
<script src="/public/scripts/example.js"></script>
|
|
</body>
|
|
</html>
|