Demo blog source code
pip install git+https://github.com/arulrajnet/attila.git@master
Then in your pelicanconf.py
set the theme to attila
.
import attila
THEME = attila.get_path()
The recommend way to install is using pelican-themes command.
-
Download latest zip from release
-
Unzip that file
-
Then
sudo pelican-themes -U attila
. Here attila is the extracted folder name -
Now list all themes
sudo pelican-themes -l
-
Use that theme name in your pelicanconf.py
-
Responsive layout
-
Navigation support
-
Paralax cover images for posts, author archives and blog
-
Author informations for posts and author archives
-
Featured posts (via plugin)
-
Reading progress for posts
-
Automatic code syntax highlight
-
Disqus support
-
Google Analytics, GAUGES and PIWIKI
-
Sharing buttons
-
Open Graph
-
Rich Snippets (JSON-LD)
The attila docs hosted in attila-docs
You can set cover images for your blog, article, page, tag, category and author. The cover images can be from your relative path or from internet.
The is the cover image for your site main index.html.
To set blog cover, set the property HOME_COVER
in
pelicanconf.py
:
HOME_COVER = '/assets/images/blog_cover.png'
Note
|
HEADER_COVER property is deprecated. Work around will be use HOME_COVER and use cover in individual articles. This property will be used if there is no cover image set to an article, page, tag, category, author. |
To set different cover image for an article set cover
metadata in front-matter.
:title: With Cover Images
:date: 2018-04-29 00:45
:author: arul
:category: foo
:tags: footag
:slug: with-cover-images
:cover: /assets/images/article_cover.jpg
For more refer article .
To set different cover image for a page set cover
metadata in front-matter.
:title: Page With Cover Images
:date: 2018-04-29 00:45
:author: arul
:category: foo
:tags: footag
:slug: page-with-cover-images
:cover: assets/images/page_cover.jpg
For more refer article .
To set cover image for a tag, set the property TAG_META
in
pelicanconf.py
:
TAG_META = {
'food': {
'cover': '/images/food.png',
'description': 'Examples ipsum dolor sit amet. Topping'
},
'drinks': {
'cover': '/images/orange-juice.png',
'description': 'Examples ipsum dolor sit amet. Juice'
}
}
To set cover image for a category, set the property CATEGORY_META
in
pelicanconf.py
:
CATEGORY_META = {
'food': {
'cover': '/images/junkie-stuff.png',
'description': 'Examples ipsum dolor sit amet. Topping'
}
}
To set cover image for an author, set the property AUTHOR_META
in pelicanconf.py
:
AUTHOR_META = {
"zutrinken": {
"cover": "/assets/images/zutrinken-cover.png"
}
}
For more refer author .
To define a simple header background color, set the property
HOME_COLOR
in pelicanconf.py
:
HOME_COLOR = 'black'
you can use any valid css color. This will be used if there is no cover image set in article level and site level.
Note
|
HEADER_COLOR property is deprecated. Work around will be use HOME_COLOR and use color in individual articles. This property will be used if there is no HEADER_COVER and cover image set to an article, page, tag, category, author. |
Github, Twitter and Facebook URLs set these properties:
SOCIAL = (('twitter', 'https://twitter.com/myprofile'),
('github', 'https://github.com/myprofile'),
('facebook','https://facebook.com/myprofile'),
('flickr','https://www.flickr.com/myprofile/'),
('envelope','mailto:my@mail.address'))
You can specify an external feed URL (e.g. FeedBurner) in SOCIAL
using
the rss
or rss-square
or feed
icons. A <link>
tag for the
external feed will be placed in <head>
instead of the default Pelican
feeds.
Define CSS_OVERRIDE
in pelicanconf.py
to insert a user defined CSS
file after theme CSS. Example:
Array of CSS you can give
CSS_OVERRIDE = ['css/myblog.css']
AUTHOR_META = { "zutrinken": { "name": "Zutrinken", "cover": "https://attila.demo.arulraj.net/assets/images/avatar.png", "image": "https://attila.demo.arulraj.net/assets/images/avatar.png", "website": "http://blog.arulraj.net", "location": "Chennai", "bio": "This is the place for a small biography with max 200 characters. Well, now 100 are left. Cool, hugh?" } }
The supported social profile for author are facebook
, github
, linkedin
, twitter
and instagram
.
Accept many analytics:
-
Google Analytics:
GOOGLE_ANALYTICS
; -
Gauges:
GAUGES
-
Piwik:
PIWIK_URL
andPIWIK_SITE_ID
.
The menu item coming from pelican config MENUITEMS
.
For ex:
MENUITEMS = (('Home', '/'),
('Tag', '/tag/getting-started/'),
('Author', '/author/pelican/'),
('Category', '/category/examples/'),
('Archives','/2015/11/'),
('Plugins', 'https://github.com/pelican-plugins'))
-
To customize header color to articles, insert the metadata
color
. -
To customize header cover to articles, insert the metadata
cover
, otherwiseog_image
orHEADER_COVER
will be used. -
To customize OpenGraph images, insert the metadata
og_image
, otherwisecover
,HEADER_COVER
or a default image from theme will be used. -
To customize Twitter card images, insert the metadata
twitter_image
, otherwiseheader_cover
,HEADER_COVER
or a default image from theme will be used. Twitter cards will be generated automatically if thetwitter
account is configured inSOCIAL
!
All image paths are relative from the site root directory. You can also
use absolute URLs for og_image
and twitter_image
.
Attila renders tags page as a tag cloud.
Use TAG_CLOUD_STEPS
configuration variable to specify number of font size
steps for the tag cloud. Default value is 5, stylesheet is written to support
up to 10 steps. If you want more steps, you’ll need to configure your CSS
manually (see CSS_OVERRIDE
)
-
Set
FACEBOOK_ADMINS
to a list of Facebook account IDs which are associated with this blog. For example['12345']
. For more info see https://developers.facebook.com/docs/platforminsights/domains -
GOOGLE_SITE_VERIFICATION
- Google site verification token. -
Set
SHOW_ARTICLE_MODIFIED_TIME
toTrue
to show the article modified time along with created time. Default isFalse
. -
Set
SHOW_AUTHOR_BIO_IN_ARTICLE
toTrue
to show the bio of author in end of the each article. Default isFalse
. -
Set
SHOW_CATEGORIES_ON_MENU
toTrue
to show the categories as menu item at the top. Default isFalse
. -
Set
SHOW_COMMENTS_COUNT_IN_ARTICLE_SUMMARY
toTrue
to show the comments count in article summary. Default isTrue
. -
Set
SHOW_CREDITS
toTrue
to show the credits of the theme at the bottom. Default isTrue
. -
Set
SHOW_FULL_ARTICLE_IN_SUMMARY
to True to show full article content on index.html instead of summary. Default isFalse
. -
Set
SHOW_PAGES_ON_MENU
toTrue
to show the each page as separate menu item. Default isTrue
. -
Set
SHOW_SITESUBTITLE_IN_HTML_TITLE
toTrue
to show the site description (Set using variableSITESUBTITLE
) after site name. Default isFalse
. -
Set
SHOW_TAGS_IN_ARTICLE_SUMMARY
toTrue
to show the tags in article summary. Default isFalse
.
refer this https://github.com/arulrajnet/attila-demo
Always open an issue before sending a PR. Talk about the problem/feature that you want to fix. If it’s really a good thing you can submit your PR. If you send an PR without talking about before what it is, you may work for nothing.
As always, if you want something that only make sense to you, just fork attila and start a new theme.
Copyright (c) 2015-2016 Peter Amende - Released under The MIT License.
Copyright (c) 2016 Arulraj V - Released under The MIT License.
Some background images used from https://github.com/gilsondev/pelican-clean-blog