Why does it exist? To make the editing, uploading, and maintenance of this site as easy as possible, I wrote this as a bespoke solution. I prefer throwing text files at my web server to logging into some bloated web interface with plugin support! Who wants to sit down and nicely format HTML all day long? Not me! I'd rather write lazy PHP code!
The main point of the LUX Web Engine is to make a single-file optionally-configurable install, without dependencies on anything else or requiring any tech knowledge. I mean, you need to have a website or something so there's a minimum bar you have to clear there.
- Easy installation. Upload a single file to your web host, and you're done. No configuartion necessary.
- No skill required. No learning esoteric markup languages, no managing manifest files, no conforming to filename conventions, no remembering passwords. Just type plain text into a file, throw it at your webserver, and you're done.
- Teensy. A few hundred lines of PHP code, and most of that is comments so you can edit it yourself. No magic sauce. See how it all works if you like. Quick and lightweight!
- Ease of use. If you want to get into some basic markup, there's shortcuts for making things bold, italic, or generating links within your own site. There are also some shortcuts for adding images, HRs, and lists. And, if you know HTML, you can just sprinkle some in wherever you want. Completely up to you, the engine works perfectly fine with no markup whatsoever. Here is what the home page of this site looks like, raw.
- No themes. We just smash your content between a header and footer that you define. Don't have a header or footer? Plain text sites work just fine too, but we recommend you grab some CSS and make it like nice. I'm being pretty cavalier putting this in the "features" section.
- Not a blog. Don't let the man tell you what your website is or isn't. Don't fall to convention. Don't be a part of the herd. Do your own thing.
- Easy updates. You can just FTP your files to your site, or you can setup GitHub web hooks to auto-publish for you. Easy! Simple!
- Extensible. With our patented "whatever" licensing terms, you could literally turn this into SkyNet and there's nothing I could do about it!
The LUX Web Engine is just a fun code exercise I did one afternoon. I would be shocked if it had no bugs. Has this been done before? Maybe? Most alternatives tend to have really complicated setups or focus too much on blog-infrastructure. This isn't a blog, though, so maybe this is unique? shrug
At this time, every page load executes a handful of PHP code and slowly reads a bunch from a hard drive. There is no smart caching or anything like that, so if you get a popularity spike your site will probably slow down. Until I get around to adding cache-support, this tool is most useful for creative writing and normal-person-popularity things.
- First, you need a server with an HTTP server set up on it. If you don't know how to do that, I've made myself some notes here that you can follow along with.
Get the latest source for LUX Web Engine on GitHub.
- Copy the source to index.php on your website somewhere.
- (Optionally) Edit the configuration paths at the top of the file. You might need to make some folders for your content.
- Add some content! Particularly, you'll need to make a default.txt file. Here's an example of my homepage.
- Using GitHub webhooks you can pretty easily hook up an auto-pull event so you don't need to use FTP anymore.
Feel free to contact me, I'm happy to improve things!
I want to write a really basic, lightweight, web-based editor to avoid the whole FTP-your-files step. But that requires authentication! Whee! For now, I just use git hooks for easy publishing.
v8 - July 2nd, 2018
- Italics no longer triggers if an underscore starts_mid_sentence, thus not breaking URLs and other things.
v7 - June 7th, 2018
- Added parsing support for blockquotes
v6 - June 3rd, 2018
- Added parsing support for horizontal rules
- Added parsing support for bulleted and numbered lists
v5 - April 30th, 2018
- Added bold and italics tag rendering
v4 - April 29th, 2018
- Changed processing flow to expose page title and page modify date to header/footer calls
- Added ability to have hyphens and apostraphes in link text
- Changed space-replacement in the URL from _ to %20
- If you link to your Default file, it'll not populate the word "default" to the page name anymore.
v3 - April 28th, 2018
- Reworked everything to be more modular, more easy to edit, and more commented
- Added a configuration section to the top of the script, and moved all the magic strings and paths there
- Added ability to do pipe-split links
v2 - April 22nd, 2018
v1 - April 1st, 2018
- First rough edition of the source, made in roughly one hour!
- Square-brace links and image compatability, and file-reading routines. Not much else, and all hard-coded! Nice!
- First public tweet announcing this project