SimpleNice is a theme for Pelican.
I was tired of beautiful but bloated themes and I wanted something simple and nice for my personal website.
I wanted it to look much better than the famous Motherf*cking Website, without sacrificing too much in terms of simplicity.
These are the main requirements for this project (in order of importance):
- accessibility: it should be accessible to people with disabilities or using non-graphical browsers. IE support is out of scope.
- theme selection: other than the default/light color scheme it should have a dark theme and a high-contrast/greyscale theme (to help people with color blindness or other visual impairments).
- usability without scripts: the use of scripts should be limited as much as possible and everything should be usable (in some way) with all scripts disabled.
- usability without CSS: the page should render decently without CSS.
- good SEO
- users' privacy: no external resources should be used, no cookies and no analytics.
- usability with any screen size
- lightness: it should also be minifier-friendly
- no external fonts
- faboulousness
It is okay to sacrifice something that is lower on the list to improve something that has higher priority. E.g. increasing accessibility while decreasing faboulousness is okay, the opposite is not.
- Theme selection (manual or automatic via prefers-color-scheme and prefers-contrast)
- The high-contrast/greyscale theme also filters images and makes them greyscale.
- Open Graph support.
- Twitter Card support.
- Schema.org support with articles' structured data for rich results.
- Sitemap support.
- robots.txt support.
- RSS and ATOM feeds support.
- Search via DuckDuckGo
- Share buttons
- Code highlight themes for Pygment
- Custom menu
- Social profiles links
- Responsive design
- Footer notice with custom licenses
The footer, by default, includes links to Pelican, FontAwesome, and this repository. None of those attributions is legally required. You can remove them, if you want. Please do not remove the attribution text in HTML and SVG comments (the minifier plugin won't remove them).
See CONTRIBUTING.md.
Your site's name. Used as part of titles (e.g. "smeso").
Your name.
Your site's FQDN (e.g. "smeso.it").
A brief description of your website. Used for SEO and social networks.
Enable search form. Boolean.
Absolute path of favicon (e.g. /favicon.png).
Favicon's MIME type (e.g. "image/png").
Absolute path of an image used for social networks' preview. Articles and pages can override this value using "image" metadata.
The MIME type for META_IMAGE.
Enable share buttons. Boolean.
A list of tuples (name, URL).
The name, converted to lower case, is also used as the icon name.
Some icons are already present in ./static/icons/
feel free to
add some more or remove those that you don't need.
You can find more icons
here.
E.g.
SOCIAL = (('GitHub', 'https://github.com/smeso'),
('Mastodon', 'https://mastodon.social/@smeso'),
('Twitter', 'https://twitter.com/smesoraca'),
('E-Mail', '/contact'),
('OpenPGP', '/openpgp.txt'))
Your twitter username. Used by Twitter's share button.
List the items you want in the menu as a list of tuples (name, absolute URL, actual generated file name).
E.g.
MENUITEMS = [('Home', '/', 'index.html'),
('Blog', '/blog/index.html', 'blog/index.html'),
('Contact', '/contact', 'contact/index.html')]
If present, it indicates your website contents' license.
E.g.
LICENSE_CONTENT = {'link': 'http://creativecommons.org/licenses/by-sa/4.0/',
'name': 'Creative Commons by-as 4.0 International License'}
If present, it indicates the license for code on your website (if different from your contents' license).
E.g.
LICENSE_CODE = {'link': 'https://www.apache.org/licenses/LICENSE-2.0',
'name': 'Apache License 2.0'}
If true, CSP will allow the use of inline scripts. This is not needed by theme itself.
Set to false
to not write the page title in the page body.
Set to none
to prevent search engine from indexing this page.
Any element with class myemail
will be assumed to be an a
tag
that looks like:
<a href="mailto:ebg13rznvy@rknzcyr.pbz">ebg13rznvy@rknzcyr.pbz</a>
where ebg13rznvy@rknzcyr.pbz
is the e-mail address rot13email@example.com
obfuscated via ROT13.
A small javascript snippet will de-obfuscate it.
This is not a great protection, but hopefully it's enough to confuse the most
naive spambots (which probably represent the 99.99% of the spambots out
there).
Feel free to modify the rot13
function in static/js/footer.js
to make
it less naive.
If you use this feature, your are strongly encouraged to add
some text to help people with scripts disabled.
E.g.
<noscript>The address is obfuscated with <a href="https://it.wikipedia.org/wiki/ROT13" target="_blank" rel="nofollow">ROT13</a>.</noscript>
To generate the sitemap and the robots.txt files you will need to specify them as direct templates:
DIRECT_TEMPLATES = ('sitemap', 'robots')
SITEMAP_SAVE_AS = 'sitemap.xml'
ROBOTS_SAVE_AS = 'robots.txt'
SVG icons are made by FontAwesome and released under: https://fontawesome.com/license/free