shellCMS now has external CSS file
My site bkhome.org is powered by shellCMS, a content management system and blog, introduced here:
https://bkhome.org/shellcms/index.html
The last time that I did any work on it was February 2020, see blog posts here:
https://bkhome.org/news/tag_shellcms.html
A limitation is that the static web pages are built with inline CSS,
so if I want to change the CSS then have to regenerate all of the pages.
Ditto, there is some text at the footer of each page that I would like
to separate out to another file, so can change if desired and not have
to rebuild all the pages.
The pages now start like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- BK 20210830 changed inline to separate css file... --> <link rel="stylesheet" href="css0/head.css" type="text/css" /> <link rel="alternate" type="application/rss+xml" title="Subscribe to this page..." href="feed.rss" />
The external 'head.css' has this:
h3 { font-size:140%; margin-top:20px; }
/* remove underline from links... */
a { text-decoration:none !important; font-weight:bold; }
/* following causes text to flow out of right side: */
pre { background-color:#f0f0f0; overflow:visible; }
/* simple test to display on a phone screen... */
/* margin-left and margin-right achieves same as align="center" in table tag... */
@media only screen and (max-resolution: 132dpi) {
table.maintable { table-layout:fixed; width:620px; margin-left:auto; margin-right:auto; }
p { font-size:110% }
}
@media only screen and (min-resolution: 133dpi) {
table.maintable { table-layout:fixed; width:100%; }
}
/* support for syntax-highlighted code exported by Geany */
.style_2 { color:#d00000; }
.style_3 { color:#007f00; }
.style_4 { color:#00007f; font-weight:bold; }
.style_5 { color:#ff8000; }
.style_6 { color:#ff8000; }
.style_7 { color:#301010; }
.style_8 { color:#000000; }
.style_9 { color:#000000; }
.style_10 { color:#000080; }
.style_11 { color: #008000; }
...it has a simple mechanism for detecting if a PC desktop or a phone screen, using the DPI (Dots Per Inch).
At the bottom of every page, now have an iframe tag:
<!-- separated out the footer text, so can change without rebuilding pages --> <iframe src="css0/foot.htm" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>
...which inserts the html code from 'foot.htm'.
Getting the blog to display nicely on both desktop and phone is still a work-in-progress!
The latest shellCMS is here:
https://bkhome.org/files/shellcms.tar.gz
Tags: shellcms
ShellCMS now supports hit counter
This has been a long time coming. I have sometimes wondered how
many people visit my blog, and today finally decided to do something
about it.
My website is created with ShellCMS, a static site generator:
https://bkhome.org/shellcms/index.html
There are lots of free visitor counters available for a static site,
many of them require running code such as Javascript at their site!!!
However, there are a few that are just <img> tag links, just
return an image file. Tried four of them, three didn't work. The fourth
one is good. It requires visiting their site and generate the code:
https://www.hitwebcounter.com/
...the HTML code has a "page" number that is unique, and you must use that.
Look at the bottom of my blog main page, and you will see the counter:
...it only appears on the main 'index.html' page, not on any sub-pages.
Support for www.hitwebcounter.com visitor counter has been
incorporated into ShellCMS, look at files 'shellcms' (comment #200202),
'cms_config/cms_footer.txt' and 'cms_config/hit-counter'. Here is the
latest tarball:
https://bkhome.org/files/shellcms.tar.gz
Tags: shellcms
Tag links fixed in shellCMS
I noticed in some cases the link to category pages was wrong. For
example link to 'http://bkhome.org/tag_quirky.html' when it should have
been 'http://bkhome.org/news/tag_quirky.html'.
Fixed, and latest tarball uploaded here:
http://bkhome.org/files/shellcms.tar.gz
For anyone interested in shellCMS, the frontpage is here:
Tags: shellcms
shellCMS page links fix
In this blog, some categories have many posts. When viewing a
particular category, for example "quirky", they are split over up-to 9
pages, 8 posts per page. The 9th page has a link to an index page, to
find older posts.
However, it wasn't building quite right. It only built up to 5 pages, and the "Older" link on each page was wrong.
I studied the code and found the cause of the problem. The fixed shellCMS is uploaded:
http://bkhome.org/files/shellcms.tar.gz
Here is the "quirky" category, you can follow the "Newer" and "Older" links at the bottom of the page:
http://bkhome.org/news/tag_quirky.html
Read all about shellCMS here:
Tags: shellcms
shellCMS bug fixes
There were a couple of bugs.
Using SeaMonkey Composer to create a new post, the shellcms script is supposed to wait until SM exits, before continuing with executing the script, however, sometimes did not wait. This was due to pidof being executed too soon.
When save a new post as a draft, the name of the file in the drafts folder was wrong.
The latest shellCMS is here:
http://bkhome.org/files/shellcms.tar.gz
GUI for shellCMS
Quirky and Easy still have PPLOG personal blog, in the "Personal" category of the menu. However, it no longer works.
I kept it in the menu, in the hope that it would be fixed. However, shellCMS can perform the same function, and a lot more. But first, I need to write a GUI for shellCMS.
shellCMS can then be used as a notes manager and blog, on local
machine as well as a remote site. It may also be a replacement for
Notecase.
Tags: shellcms
shellCMS category front-pages
I have added a very nice enhancement to shellCMS, per-category front-pages, and have written a tutorial page to introduce it:
http://bkhome.org/shellcms/category-front-pages.html
Here is a front-page for the "shellcms" category:
Notice too, it has its own top-banner. Now, all posts in that
category have that banner.
Tags: shellcms
Local www folder hierarchy matches remote site
When I first created shellCMS (forked from BashBlog), I specified the local copy of the website in a folder named LOCAL. If there is a nested shellCMS, say "news", then it was in LOCAL/news/LOCAL, which is getting weird. And difficult to understand when looking at shellCMS for the first time.
I have modified the shellcms script so that the local website is now www, and everything inside is exactly as it will be on the remote host. This greatly simplifies everything, and is easy to understand.
I have rewritten these tutorials accordingly:
http://bkhome.org/shellcms/install-at-top-level-as-document-manager.html
http://bkhome.org/shellcms/installing-shellcms-as-a-blog.html
There is another improvement that I want to work on next, that
users will like. Hope to implement that tomorrow morning.
Tags: shellcms