Overview of Using Guise Mummy

Guise Mummy is one of the fastest and most standards-compliant ways to create a static web site and beyond. You can create and test a web site with a simple Markdown file. Guise Mummy will convert the Markdown site to HTML, allow you to test it locally, and can even deploy it to a cloud provider.

Project Structure

Although Guise Mummy allows you generate a site from a single file in a directory, it is best to organize your files into a project structure from the very beginning. Inspired by the Maven Standard Directory Layout, Guise Mummy has a recommended recommended directory structure (TODO) which it recognizes automatically without the neeed for further configuration.

Guise expects your web site source files to be placed in the src/site directory relative to your web site project directory. Assuming that your probject directory is my-site, the source files for your site should be placed in my-site/src/site. Guise will generate your site in the my-site/target/site directory, creating this target directory automatically as needed

Default Home Page

Create a single home page in Markdown inside the site source directory. Because the home page will be the default page shown, the base name should be index—that is, index.md for a Markdown file.

my-site/src/site/index.md
---
title: My Site Home Page
---
# My Site

Welcome to my site.

Build Site: “Mummify”

Guise refers to the generation of a static site from source files as “mummification”. To generate your static site open your command line terminal. Change to the project directory such as my-site, and enter the guise mummify command. Guise Mummy will generate a corresponding index.html HTML file in target/site directory inside your project directory.

$ cd my-site
$ guise mummify
   _____       _
  / ____|     (_)
 | |  __ _   _ _ ___  ___
 | | |_ | | | | / __|/ _ \
 | |__| | |_| | \__ \  __/
  \_____|\__,_|_|___/\___|


Guise CLI x.x.x

Mummify...
[INFO] Project directory: …/my-site
[INFO] Site source directory: …/my-site/src/site
[INFO] Site target directory: …/my-site/target/site
[INFO] Site description target directory: …/my-site/target/site-description
[INFO] Mummify phase: INITIALIZE
[INFO] Mummify phase: VALIDATE
[INFO] Mummify phase: PLAN
[INFO] Mummify phase: MUMMIFY
Done.
my-site/target/site/index.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>My Site Home Page</title>
  <meta name="generator" content="Guise Mummy x.x.x" />
  <meta name="generated-at" content="2021-07-30T13:25:38.255700900Z" />
</head>
<body>
  <h1>My Site</h1>
  <p>Welcome to my site.</p>
</body>
</html>

TODO talk about the purpose of these output files, and how one could copy them to a server

Test Using Local Server

Although you could use your browser to view the generated files in my-site/target/site/index.html directly, not all features would function the same as when your site is deployed to a real web server. For this reason Guise comes with a built-in server for testing your site locally. Use the guise serve command to start a server at localhost on port 4040 by default. Add the --browse flag and Guise will automatically open the page in your browser.

$ guise serve
   _____       _
  / ____|     (_)
 | |  __ _   _ _ ___  ___
 | | |_ | | | | / __|/ _ \
 | |__| | |_| | \__ \  __/
  \_____|\__,_|_|___/\___|


Guise CLI x.x.x

Serve...
[INFO] Project directory: …/my-site
[INFO] Site source directory: …/my-site/src/site
[INFO] Site target directory: …/my-site/target/site
[INFO] Site description target directory: …/my-site/target/site-description
[INFO] Server base directory: C:\Users\user\AppData\Local\Temp\guise\mummy\server
[INFO] Server port: 4040
[INFO] Initializing ProtocolHandler ["http-nio-4040"]
[INFO] Starting service [Tomcat]
[INFO] Starting Servlet engine: [Apache Tomcat/9.0.30]
[WARN] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [510] milliseconds.
[INFO] Starting ProtocolHandler ["http-nio-4040"]
[INFO] Serving site at <http://localhost:4040/>. (Press Ctrl+C to stop.)

Hyperlinks

One of the revolutionary features of the world wide web was the ability to connect documents with hyperlinks. Guise Mummy handles links throughout your site, and has extensive capabilities for creating relative paths and best-practice link forms. Guise handles standard Markdown links, so update your original index.md source page and add a second about.md page.

my-site/src/site/index.md
---
title: My Site Home Page
---
# My Site

Read more [about](about.md) this site.
my-site/src/site/about.md
---
title: About My Site
---
# About My Site

This site helps you get started with Guise Mummy.

Return to the [home page](index.md).

Make sure you've stopped the local server using Ctrl+C, then generate the site again. You don't need to use --browse when starting the local server again if you still have the browser window open. Just reload the page once the local server is started.

$ guise mummify
guise serve
TODO list of things to notice, including `/` vs `index.html`

See the links documentation (TODO) for more information.

Project File

As your project grows larger than just a few pages, you will want to add a project definition file project definition file.