spc476/mod_blog
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
BlogFree() assumed a configuration file was specified. Also, fix an error message to better indicate that the config file is missing.
8eb3f66
Git stats
Files
Failed to load latest commit information.
Finally, an update to the very outdated mod_blog that's been available since September 3, 2009. There still isn't much documentation because, as of yet. I doubt what's here is enough but for the most dedicated to go through the code to see how this works. REQUIREMENTS If you don't meet these requirements, then you probably won't get very far. The software was written in C (don't bother asking for Perl code---there isn't any, and there won't be any) and as such, makes certain assumptions, such as: * Linux (or any POSIX compilant UNIX system) * GCC (or any C99 compiler that may come with your system) * Apache * Lua 5.1 or higher The code right now assumes you'll be running this under Apache. COMPILATION You'll need to install my CGILIB library (6.6 or higher) to compile this blog software. You can install it from https://github.com/spc476/CGILib To install it once it's downloaded, all it should take is "make" and then "make install" as root. The library assumes a POSIX environment and should compile as is on most modern Unix systems. Once that is installed, you should be able to do a "make" and generate the blog engine. It's built as a setuid program to avoid having a world-writable directory, but if that is a concern, you can certain remove the setuid'ness of it, but make sure the data directories are writable by Apache. INSTALLATION The assumption on the blog engine is that the executable resides in a directory visible to Apache and runnable from within Apache's docroot for the the site in question. I have my copy named as "boston.cgi" and Apache configured to execute such programs via CGI. The htdocs/ subdirectory contains a sample website to run the blog. There's also a sample htaccess file that shows the method I use to run the blog engine. In the journal/ subdirectory is out-of-band files (which should not be served up by Apache). There you will find a sample configuration file and a sample entry to see how the data is stored (each entry is a separate file, stored under a Year/Month/Day directory structure). And yes, there is code to do email notifications, but it's not enabled by default. I only left the code in to support the half dozen people that did sign up to receive email notifications. The HTML entry form works, but it's not my primary method for new entries---for that, I use email. I have the following line in '/etc/aliases': myjournal: "/path/to/boston.cgi --config /path/to/config --email --cmd new" To make an entry, I format an email to the journal address as: +-----[top of file]---------------------------- |author: [who you set at author---exact match] |title: [title of entry] |class: [keywords] |status: [status repeated on Facebook] |adtag: [keyword used for advertising network] | |body of entry, usually including HTML | ... +---------------------------------------------- And that's pretty much it. Good luck.
About
A blogging engine in C
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published