In this document you will find some stuff for hardcore CLI wizards and server gurus.
If you do not want to use blogophon
, read the manual operations instructions.
Your generated blog will use the time zone set by your operating system. On some systems you may not be able to set the correct time zone, so pages created and generated by the Blogophon will use the wrong time zone. For Linux / Mac OSX there is a workaround on how to supply the correct time zone when starting Blogophon's scripts:
export TZ='Europe/Berlin'; blogophon-generate
…where Europe/Berlin
can be replace with any TZ value from the tz database.
This will also work with cronjobs (see below).
As the Blogophon will ignore articles with a publishing date set into the future, you may want to build some mechanism for generating your unpublished pages automatically. Here is how:
Get the path to your blog by typing pwd
. Then edit your Crontab: crontab -e
Add one of these lines:
# Midnight, daily without log
58 23 * * * cd PATH_TO_YOUR_BLOG && blogophon-generate >/dev/null 2>&1
# Midnight, daily with log
58 23 * * * cd PATH_TO_YOUR_BLOG && blogophon-generate --log >> logs/generate.log 2>&1
# Every 30 minutes, but only one job at a time
*/30 * * * * cd PATH_TO_YOUR_BLOG && flock -xn ~/blogophon.lck -c "blogophon-generate >/dev/null 2>&1"
For more exotic execution times check http://crontab-generator.org/. And keep in mind to check the time zone your crontab will be executed in.
If you like to keep your editing and your HTML files in separate directory or a separate machine, the deployCmd
in user/config.json
may come in handy. Here are some examples you might find useful:
echo \"Publishing...\" && rsync -az --delete htdocs HOST:PATH_TO_YOUR_BLOG && echo \"Published\" # Sync only published HTML files, keep Blogophon from live server
echo \"Publishing...\" && rsync -az --delete user HOST:PATH_TO_YOUR_BLOG && echo \"Published\" # Sync only Markdown files, let publishing be done by Cronjob or Daemon
If you use Sublime Text for editing your Markdown files, consider installing Markdown Extended. It supports YAML frontmatter and code block syntax highlighting in Markdown files. Also MarkdownLivePreview will show how your Markdown will finally look like.
If you use Microsoft Visual Studio Code you can toggle the built-in Markdown preview by pressing Ctrl + K
, followed by a V
.
If you use Github Atom you can toggle the built-in Markdown preview by pressing Ctrl + Shift + M
.
In case you want to move articles from the old file structure (user/posts/TITLE.md
) to the new file structure (user/posts/TITLE/index.md
) here is a little bash script which will do this for all articles which already have an existing folder to move to:
#!/bin/bash
# Exectute in `user/posts`
for DIRECTORY in `find . -type d`; do
OLD_FILE="$DIRECTORY.md"
NEW_FILE="$DIRECTORY/index.md"
if [ -f $OLD_FILE ]; then
mv $OLD_FILE $NEW_FILE
fi
done
You will find a sample Apache configuration in your user
directory after finishing setup.
If you are not allowed to edit the Apache configuration, there is also a .htaccess
file in your user
directory after finishing setup. This file can be moved to your document root folder htdocs
.
You will find a sample nginx configuration in your user
directory after finishing setup.
The Blogophon RSS feed allows for other services to automatically re-publish news about your new articles. This can be used to promote your articles on services like Twitter. This idea is called POSSE (Publish (on your) Own Site, Syndicate Elsewhere).
If This Than That handles republishing of RSS feeds to other services. After registering an account just follow these steps:
- Click on your user account and select "New applet".
- For
if [this]
select "Feed > New feed item". - Add the feed URL of your blog (e.g.
http://www.example.com/posts.rss
). You may also choose to use the RSS feed of a special tag (e.g.http://www.example.com/tagged/…/posts.rss
). - For
then [that]
select "Twitter > Post a tweet", or whatever service you want to use. - Allow IFTTT to access the service you selected.
- Configure how your blog post's URL and title will be posted to the service you selected.
You may want to deactivate URL shortening in IFTTT's settings.
Slack offers a plugin to import RSS feeds directly to a Slack channel. Just follow the instructions on installing the RSS app into Slack.
In certain environments you may not be able to install the Blogophon globally. Thankfully there is a way to locally install the Blogophon.
- Run
npm init && npm install blogophon --production
in a folder you have access to.
- All commands relating to
blogophon
may now be called by executingnode node_modules/.bin/blogophon
- All commands relating to
blogophon-generate
may now be called by executingnode node_modules/.bin/blogophon-generate
As the Blogophon is a static site generator, there is no built-in site-search functionality. Luckily you can search your site with any regular search engine by submitting a search term, prepended by site:YOURDOMAIN
.
The Blogophon uses this method to supply a site-search. When configuring your blog, you will be asked for a search URL. This may be one of the following URLs…
- https://www.google.de/search?q=
- https://www.bing.com/search?q=
- https://search.yahoo.com/search?p=
- https://www.yandex.ru/search/?text=
- https://duckduckgo.com/?q=
…or if you want to integrate your own search engine you will have to paste the URL of your search engine. Anyway, the search term will be appended to the supplied search engine URL.
This mechanism will automatically generate a search form and a matching opensearch.xml
.
To check on how your blog is performing on search engines, register for the appropriate search management consoles:
- Google Webmaster search console at https://www.google.com/webmasters/
- Bing Webmastertools at https://www.bing.com/toolbox/webmaster
The steps for setup are identical for all search consoles:
- Put verification HTML / XML page into your
/htdocs
folder. - Submit sitemap located at
/sitemap.xml
. - Add URL parameter
utm_source
and mark it as "does not alter site content".
Return to table of contents.