public

The public directory contains your finished web site.

Every time you run Uriel against your project directory, your web site is completely regenerated from scratch.

Do not put anything in the public directory directly, or it will be deleted or overwritten the next time you run Uriel against your project.

If you want to put a file in the public directory so that it ends up on your web site, put it in the static directory instead. Then it will be copied into the public directory every time Uriel rebuilds your web site.

Previewing Your Web Site

The web sites that Uriel generates are intended to be viewed through a web server. Fortunately, Python comes with a built-in web server.

The following shell commands show how to start the Python web server to preview your web site:

# change into the project directory for your web site
# (in this case, this documentation site)
cd documentation/

# change into the public directory (within your project)
cd public/

# run the built-in Python web server
python3 -m http.server

This will start a built-in Python web server on port 8000. You can now preview your site using the following link: http://localhost:8000/

If you have make installed, you can also use the preview target that comes with the Makefile Uriel created for your project:

make preview

Publishing Your Web Site

You have a lot of options when it comes to hosting a static web site. Almost any possible web hosting service should work.

Your web hosting service will need to be configured to treat index.html files as directory indexes. This is already the default pretty much everywhere. If your hosting provider does not do this already, then you'll need to figure out how to enable that with your provider.

If you are using make to build your web site, consider adding a publish target to the Makefile in your project. That way, you can upload changes to your web site with a single command that stays with your project.

Tags:

This page was generated by Uriel with the following settings:

Page Details

Resource Path Project File
Node directories/public nodes/directories/public
Template default.html templates/default.html
URL /directories/public/ public/directories/public/index.html

Node Headers

Header (Lowercase) Value
title public
breadcrumb-separator »
canonical-url https://documentation.uriel.foo
rss-description Uriel Documentation
rss-image-height 32
rss-image-url /favicon-32x32.png
rss-image-width 32
rss-max-entries 50
rss-title Uriel Documentation
rss-url /rss.xml
sitemap-max-entries 10000
sitemap-url /sitemap.xml
tag-node tag
template default.html

Node Timestamps

Type Value
Created
Modified 2026-06-10T20:30:18-04:00

Node Methods

Method Value
get_parent_node() directories/index
get_path() directories/public
get_node_type() file
get_url() /directories/public/
get_canonical_url() https://documentation.uriel.foo/directories/public/
get_name() public
get_display_name() Public
get_title() public
get_escaped_title() public
get_link() <a href="/directories/public/">public</a>
get_canonical_link() <a href="https://documentation.uriel.foo/directories/public/">public</a>
get_link_prefix() <p>
get_link_suffix() </p>
get_tags() []
get_dest_dir() ./public/directories/public
get_dest_file() ./public/directories/public/index.html
get_breadcrumb_separator() &raquo;