Skip to content

Simple Website Framework v1.1.3

Choose a tag to compare

@ScarylePoo ScarylePoo released this 22 Oct 08:03
· 5 commits to main since this release

Simple Website Framework 1.1.3

Drafts. Every save now has a Save as draft alternative. A new page saved as a draft is unpublished: visitors get a 404, it stays out of archives, category pages and the feed, and it shows in the editor with a Draft badge until you Publish. Draft changes to a live page leave the live page untouched until you publish or discard them. You can view a draft at its real address while logged in. (Drafts are pages/<name>.html.draft files; nothing public looks for that extension, so no theme needs to know.)

Unsaved work is recovered. The editor keeps what you're typing in your browser's storage; close the tab or time out and reopening the page offers to restore it.

RSS, properly. Feed autodiscovery tags on every page — the site feed plus one per category, generated from the categories that exist, with the current category first on category pages — so feed readers find your feeds again. A [feeds] shortcode lists them for people. Items now carry the full post ($rssFullContent = false for excerpts), a permalink guid, author, categories and correct enclosure sizes; relative image URLs are absolute; entities aren't double-encoded; capped at $rssMaxItems (50).

Sitemap. /sitemap.xml generated from live pages, advertised in robots.txt. <!-- sitemap: no --> keeps a page out.

Editor fixes. A post is now always created under posts/ and its address is made from the title, so the "post saved as a page called /posts" accident can't happen; the "already exists" error names the file and links to it. Every editor response is Cache-Control: no-store, so host page caches can't serve a stale editor or a stale 404. The editor warns when the active theme's templates bypass swf_page_source() (which made previews show the saved page instead of the draft).

Backups. Archive names now include the site's domain (swf-example.com-content-…zip).

Housekeeping. .gitignore fixed (totp-used.json and build/ weren't ignored); lockouts.json untracked. Starter theme bundle refreshed.

Upgrading: unzip swf-upgrade-v1.1.3.zip over the site. Then check .htaccess against .htaccess.dist — this release adds two rules (sitemap.xml and .draft), listed in UPGRADE.txt — and add Sitemap: /sitemap.xml to robots.txt. Custom themes: one line in header.php enables feed autodiscovery; see the RSS documentation page.
New site: download swf-install-v1.1.3.zip, unzip it into your web root, copy config/config-example.php to config/config.php and set your domain. INSTALL.txt inside has the steps.

Upgrading: download swf-upgrade-v1.1.3.zip and unzip it over your existing site, replacing files. It never touches pages/, images/, config/config.php, robots.txt or your .htaccess. UPGRADE.txt inside has the details, including anything to copy across from .htaccess.dist.

Full Changelog: v1.1.2...v1.1.3