myWebLog
Configuring
All of the processes on this page require a Web Log Admin
access level; the “Users” section describes the rights granted by the various access levels.
Blog Settings
When a blog is initialized, you set the site name; however, there are several other things that can be configured. Once you log on, click the “Modify Settings” button on the dashboard or the “Settings” link in the menu.
- Slug is generated as a URL-safe version of the name of the web log when it is created; in our example, it would be
a-blog-about-nothing
. It is used as the default name for backups, and is the path where uploaded files are stored and served. This means that changing this value can break links to uploaded files. Changing this value will change the file location, which is fine when you are initially setting up; but, if you have linked to uploaded files, those links will need to be updated. - Subtitle applies to your blog. For our “A Blog about Nothing”, the subtitle could be “Inside the mind of Jerry Seinfeld” or “Notable nothings from the series.” It is optional, so it can be left blank as well.
- Theme selects the theme with which the blog will be rendered. This list comes from all themes loaded into the particular instance of myWebLog. See Themes for more on how to write and add themes.
- Default Page specifies your home page. It can be set to any static page, or can be configured to display a page of the most recent posts.
- Posts per Page limits the number of posts displayed on post list pages, including category and tag indexes. It is also the default setting for the RSS feed(s), though feeds have different settings.
- Time Zone is the IANA time zone name of the “local” time zone for the blog. myWebLog stores dates/times in GMT/Zulu, but adjusts to this time zone when displaying them. (An interesting side effect of this is being able to modify the timezone; the display will change, but will remain accurate to the initial dates/times.)
- Auto-Load htmx, if set, will cause the
{% page_foot %}
tag to add ascript
link for htmx. If your theme uses htmx, checking this will ensure that it is loaded. - Upload Destination sets the default location for uploaded files. The default value is “Database”, but each file can be targeted for either database or disk. See the preceding link for more information on the implications of this setting.
Users
There are four access levels for logged on users:
Author
allows the user to create, edit, and publish posts which they themselves have written.Editor
allows these same rights, but for any post on the site; however, they may not delete pages or posts.Web Log Admin
allows the user to edit the settings described above, delete posts and pages, and configure RSS settings.Administrator
can manage themes and control the application-wide caches.
Each level includes the rights of the ones above it. When a new web log is created, the user will be created as an Administrator
if there are no other web logs in the database. Otherwise, the new user is created as a Web Log Admin
; a CLI command to upgrade that user to a full administrator is available, and the output reminds you of that if it applies.
Users are maintained on the “Settings” page below the web log settings. To add a user, click the “Add a New User” button and provide the requested information (URL is optional; all other fields are required). You will only be able to create a user at your level or below. You can also edit existing users; for the edit page, if you are not trying to reset the user's password, leave both fields blank. Finally, you can delete users as well; however, if a user has authored any pages or posts, the deletion will fail. Additionally, you cannot delete your own account.
There is also a CLI command to set a password for a user. The form of this command is:
./myWebLog[.exe] set-password [url-base] [email-address] [password]
Categories
myWebLog supports a hierarchical set of topics under which posts may be categorized. For our Seinfeld blog, we may make a category of “Cast”, then have subcategories of “Jerry Seinfeld”, “Elaine Benes”, “George Constanza”, “Cosmo Kramer”, etc. A baking blog may have categories such as “Cookies”, “Cakes”, “Pies”, and so on. Each category can have a description, which can be displayed in category lists or on the category archive pages.
To create a category, click “Categories” from the top menu bar, then click the “Add a New Category” button. This presents you with a few fields:
- Name is the displayed name of the category. HTML is allowed here;
4<sup>th</sup> Season
would be valid. - Slug is the URL for this category; whatever is put here will be appended to
/category/
, as well as the slugs for any parent categories. The slug should only have lowercase letters, numbers, and hyphens. As an example, if we are creating Elaine's category, we would enter the slugelaine-benes
, which would make the category archive page's URL[blog-root]/category/actors/elaine-benes/
. - Parent Category is optional; leaving it set to “- None -” will define a top-level category. For Elaine, we should pick the “Actors” category.
- Description is free-form text that can be used to describe this category. It supports HTML as well.
These fields can all be editing for existing categories by clicking “Edit” under the category, and may be deleted by clicking “Delete”. Deleting a category removes that category from any posts to which it had previously applied, but has no other effect; the posts are still accessible via the post index pages and any other category or tag archive pages.
Tag Mappings
Tags are a non-hierarchical, unstructured way by which posts may be categorized. For our Seinfeld blog, we might have a “coffee” tag that we apply to all posts where coffee is mentioned. They should be lowercase text (though they can contain spaces; these will become “+” in the URL). Tagging a post coffee shop
will cause it to appear in the tag archive page at [blog-root]/tag/coffee+shop/
.
In some cases, though, you may want to tag a post with a character that is not valid when used in a URL. For example, the #
character is used to identify an anchor on a page; the @
character can be used to construct a username/password combination; and, as we mentioned in the last paragraph, +
is translated to a space. Perhaps you want to use @#&*%@
as a tag to represent cartoon profanity, or you want to tag your post about C++ programming language development as c++
; neither of those would be valid. This is the problem “tag mappings” solve; these tags can be mapped to a URL-friendly string.
To create a tag mapping, click “Settings” in the menu, then click “Tag Mappings” just below the page title. Clicking the “Add a New Tag Mapping” button will show two fields; the tag goes on the left, and the URL-friendly version goes on the right. In our examples above, @#&*%@
could map to cartoon-profanity
, and c++
could map to c-plus-plus
. Once these mappings are defined, the template filters will generate the correct link; and the archive pages will translate the other way, finding posts tagged with the URL-unsafe value.
Category and Tag Feeds
Along with a standard RSS feed, which displays the most recent posts, myWebLog supports the same type of feed restricted by either category or tag. These are enabled by default, and may be configured with other feeds.