Jacob
b27785792f
These are created on the fly, and as such should probably not be included in the Git repository. Add the files to .gitignore to prevent them from being included in the repository in the future. |
||
---|---|---|
articles | ||
css | ||
img | ||
md | ||
php | ||
projects | ||
rocks | ||
sucks | ||
updates | ||
.gitignore | ||
.htaccess | ||
about-me.php | ||
based.php | ||
blog.php | ||
credits.php | ||
donate.php | ||
ideas.php | ||
index.php | ||
LICENSE | ||
LICENSE.blog | ||
news.php | ||
opinions.php | ||
overlay.xml | ||
philosophy.php | ||
privacy.php | ||
README.md | ||
rss-archived-01.xml | ||
rss-archived-02.xml | ||
test.sh | ||
updates.xml |
speedie-page
Everything required to host my site on your own.
Dependencies
- php
- Web server (not required for testing)
Testing
You can test the page using php -S localhost:1337
and opening
http://localhost:1337
in your web browser.
Crontab notes
If you want to git pull every minute, you can do the following:
sudo crontab -e
to edit the crontab file- Add
*/1 * * * * su -s /bin/sh <your user> -c '/usr/bin/gitpull.sh'
to the file. - Add the following to /usr/bin/gitpull.sh
#!/bin/sh
cd /var/www/page
cd speedie.site # assuming /var/www/page/speedie.site is the git repository
git pull origin master > /tmp/gitpull_speedie.site # log file
Blog
The blog is handled by blog.php
. It also generates rss.xml on
execution if the result differs from the existing file. To
add new blog posts, add a new Markdown article to /articles.
You must also create a .md.date file for the new page.
The .md.date contains the date, in YYYY-MM-DD format. It is
used for RSS feeds, and for sorting.
Contributions
To contribute, simply create an issue or submit a pull request. You know how it works.
License
License for almost all PHP is GNU General Public License version 3.
The license for blog.php
is MIT though, see LICENSE.blog.