flex/README.md

137 lines
3.8 KiB
Markdown
Raw Normal View History

2015-07-18 11:27:29 +02:00
# Flex
2015-07-19 02:04:01 +02:00
2015-07-18 11:27:29 +02:00
A minimalist [Pelican](http://blog.getpelican.com/) theme.
2015-07-19 02:04:01 +02:00
## Features
- Mobile First
- Responsive
- Semantic
2015-07-19 02:22:29 +02:00
- SEO Best Practices
2015-07-20 04:34:54 +02:00
- Open Graph
- Rich Snippets (JSON-LD)
2015-07-19 02:04:01 +02:00
## Integrations
2015-07-21 05:49:51 +02:00
- AddThis
2015-07-19 02:04:01 +02:00
- Disqus
- Google Analytics
- Google Tag Manager
- StatusCake
## Custom settings
See what you can customize.
2015-07-19 02:43:25 +02:00
> Maybe some Pelican settings not work properly.
| Name | What does it do? |
|:----:|------------------|
2015-07-20 04:34:54 +02:00
| SITETITLE | Site title to show in sidebar. |
| SITESUBTITLE | Short description to show below subtitle. |
| SITELOGO | Profile picture to show above author name (absolute url). |
| SITEDESCRIPTION | Site description to use in meta tags. |
2015-07-20 06:52:02 +02:00
| OG_LOCALE | language_TERRITORY for Open Graph. Default is `en_US`. |
2015-07-19 02:43:25 +02:00
| COPYRIGHT_YEAR | Copyright year to display on footer. |
| CC_LICENSE | Creative Commons License to show on footer. |
| MENUITEMS | A list of tuples (Title, URL) for additional menu items to appear on main menu. |
| LINKS | A list of tuples (Title, URL) for links to appear on the sidebar menu. |
| SOCIAL | A list of tuples (name, URL) to appear in the "social" section. |
| MAIN_MENU | Show main menu. |
2015-07-20 04:34:54 +02:00
| ROBOTS | Robots meta tag value. |
2015-07-21 05:55:32 +02:00
| ADD_THIS_ID | AddThis public id. |
2015-07-19 02:43:25 +02:00
| DISQUS_SITENAME | Disqus website's shortname to activate Disqus. |
| GOOGLE_ANALYTICS | Activate Google Analytics. |
| GOOGLE_TAG_MANAGER | Activate Google Tag Manager. |
| STATUSCAKE | Show StatusCake Uptime badge on footer. |
### Example
```python
2015-07-20 07:04:44 +02:00
AUTHOR = 'Foo Bar'
SITEURL = 'http://yoursite.com'
2015-07-20 19:08:52 +02:00
SITENAME = 'Foo Bar\'s Blog'
2015-07-20 04:34:54 +02:00
SITETITLE = 'Foo Bar'
SITESUBTITLE = 'Web Developer'
SITEDESCRIPTION = 'Foo Bar\'s Thoughts and Writings'
SITELOGO = 'http://yoursite.com/img/profile.png'
2015-07-21 05:55:32 +02:00
2015-07-20 07:04:44 +02:00
FAVICON = SITEURL + '/images/favicon.ico'
2015-07-20 04:34:54 +02:00
ROBOTS = 'index, follow'
2015-07-21 05:55:32 +02:00
2015-07-19 02:43:25 +02:00
COPYRIGHT_YEAR = 2015
CC_LICENSE = { 'name': 'Creative Commons Attribution-ShareAlike', 'version':'4.0', 'slug': 'by-sa') }
2015-07-21 05:55:32 +02:00
2015-07-19 02:43:25 +02:00
MAIN_MENU = True
2015-07-21 05:55:32 +02:00
ADD_THIS_ID = 'ra-77hh6723hhjd'
2015-07-19 02:43:25 +02:00
DISQUS_SITENAME = 'yoursite'
GOOGLE_ANALYTICS = 'UA-1234-5678'
2015-07-19 02:44:10 +02:00
GOOGLE_TAG_MANAGER = 'GTM-ABCDEF'
2015-07-19 02:43:25 +02:00
STATUSCAKE = { 'trackid': 'your-id', 'days': 7 }
```
2015-07-19 02:04:01 +02:00
2015-07-20 19:46:31 +02:00
If you want a full working example take a look [here](https://github.com/alexandrevicenzi/blog/blob/master/pelicanconf.py).
2015-07-19 02:04:01 +02:00
### How main menu works?
If `MAIN_MENU = True`, the order is: Home, `MENUITEMS`, Atom and RSS if available.
### How sidebar menu works?
The order is Pages and `LINKS`. `LINKS` are shown in a new page.
2015-07-19 02:43:25 +02:00
### How social menu works?
2015-07-19 02:04:01 +02:00
All icons are provided by [Font Awesome](http://fortawesome.github.io/Font-Awesome/).
A set of icons have custom background, for this you must follow the names below:
2015-07-19 02:04:01 +02:00
- envelope-o (for email)
2015-07-19 02:04:01 +02:00
- facebook
- github
- github-alt
- google
- linkedin
- pinterest
- rss
- twitter
- youtube
Example:
```python
SOCIAL = (('linkedin', 'https://br.linkedin.com/in/alexandrevicenzi/en'),
('github', 'https://github.com/alexandrevicenzi'),)
```
If you need more icons, you will need to add a custom background to keep all icons similar.
## Custom File Metadata
2015-07-19 02:43:25 +02:00
| Name | What does it do? |
|:----:|------------------|
2015-07-22 06:26:35 +02:00
| Summarize | Enable Home summary. |
2015-07-20 04:34:54 +02:00
| Cover | Cover image for social sharing (absolute url). |
2015-07-20 19:46:31 +02:00
| og_locale | Open graph locale for article. |
2015-07-19 02:04:01 +02:00
By default, all article content is shown on Home.
If the article has a custom Summary, the custom summary is shown.
2015-07-22 06:26:35 +02:00
If the article has `Summarize: True` metadata, the default article summary is shown.
2015-07-19 02:04:01 +02:00
2015-07-21 05:49:51 +02:00
## Code Highlight
If you want to replace Pygments theme (default is GitHub) take a look at [Pygments Docs](http://pygments.org/) and replace `pygments.min.css`.
2015-07-19 02:04:01 +02:00
## Live example
2015-07-24 01:43:01 +02:00
You can see how things looks like [here](https://blog.alexandrevicenzi.com/flex-pelican-theme.html).
I'm using Flex in my [personal blog](http://blog.alexandrevicenzi.com/).
2015-07-19 02:04:01 +02:00
2015-07-19 02:28:34 +02:00
![Screenshot](https://github.com/alexandrevicenzi/Flex/blob/master/screenshot.png)
2015-07-19 02:04:01 +02:00
## License
MIT