Skip to content

Commit

Permalink
Release 2.3.0 (#389)
Browse files Browse the repository at this point in the history
Release 2.3.0
  • Loading branch information
talha131 authored Jun 29, 2019
2 parents ff34067 + 5e3f262 commit af6f152
Show file tree
Hide file tree
Showing 17 changed files with 2,455 additions and 9 deletions.
1 change: 1 addition & 0 deletions .hound/ignoredfiles
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
static/tipuesearch/
static/magnific/
16 changes: 16 additions & 0 deletions .yaspeller.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"AWegnerGitHub",
"Ayub",
"Baskerville",
"bing",
"Blais",
"blog-o-matic",
"bnice5000",
Expand All @@ -49,13 +50,16 @@
"Dijk",
"disqus",
"disqus_identifier",
"div",
"dogfooding",
"emoji",
"exif",
"extract_toc",
"Fami",
"favicon",
"Fayad",
"fayadfami",
"FontAwesome",
"foss",
"fucking",
"Gan",
Expand All @@ -70,6 +74,7 @@
"Gómez",
"Hi Talha",
"Hi",
"html5validator",
"https",
"Iconifier.net",
"ijvxwtg",
Expand All @@ -94,6 +99,7 @@
"Lekhonkhobe",
"leotrs",
"liangfu",
"lightbox",
"Lin",
"linuxabc",
"MacBook",
Expand Down Expand Up @@ -122,14 +128,19 @@
"netlify",
"newbies",
"newline",
"NoDerivatives",
"NonCommercial",
"OneLink",
"onelink",
"organizational",
"os",
"Pablo",
"pelicanconf",
"permalinks",
"peru",
"phdbreak",
"photogallery",
"piexif",
"piwik",
"Pubcon",
"Pygments",
Expand All @@ -144,12 +155,14 @@
"rss",
"screenshots",
"setuptools",
"ShareAlike",
"Shen",
"sidebar",
"sidebar's",
"silverhook",
"sitemap",
"solarized",
"SourceCodePro",
"StatCounter",
"statcounter",
"sudo",
Expand All @@ -173,7 +186,10 @@
"uncollapsed",
"unhide",
"unordered",
"validator",
"virtualenv",
"w3c_validator",
"webmasters",
"Wegner",
"xiang",
"xiaoweiz",
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# Version 2.3.0

## Project Management

- Documentation is hosted at https://elegant.oncrashreboot.com/
- Host and build documentation using Netlify
- `elegant.oncrashreboot.com` domain is the final home of documentation. It shall never change
- Delete github pages and related repositories

## Features

- New: FontAwesome updated to version 4.7.0
- New: `Photos` plugin support for photo gallery creation
- New: Lightbox support for `Photos` plugin
- Fixed: Amazon One Link div is in the header
- Fixed: Separated claims for Google and Bing into individual includes

## Documentation

- New: Help article on claim Google and Bing

## CI

- New: Enable deploy previews for every pull request
- New: Add spell check for every pull request, and `master` and `next` branches
- New: Add git hooks to format the code
- New: Add commit Zen support
- New: Add html5validator, which along with w3c_validator, makes for two html validation tools in the CI
- New: Improve CI build times
- Remove: peru for downloading plugins and themes
- New: Add pull request template

# Version 2.2

- New: TipueSearch updated to 7.1
Expand Down
43 changes: 43 additions & 0 deletions documentation/content/Elegant - Pelican Theme/claimsite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
Title: Claim website on Google and Bing
Tags: pelican-theme, pelican-plugin, claim
Category: Elegant - Pelican Theme
Date: 2019-06-27
Slug: website-claim
Disqus_identifier: hk9m5eq-website-claim
Subtitle:
Summary: Use Pelican to insert headers to claim website
Keywords:
---

For submitting a website and sitemap to Google Search Console or Bing Webmaster tools
we've to consider some steps.

One of those steps is to claim the website ownership.

Several approaches are available:

- Create a specific file on the root folder of the website
- Use a DNS Record
- Insert a `<meta>` TAG in pages to claim it.

Usually both DNS record or uploading files make things more complicated
(require DNS setup, or configure pelican to upload static file to path,
etc).

Pelican-Elegant has simplified this by including support for the `<meta>` TAG
being inserted if the values are defined in pelicanconf.

Use the following variables to insert the relevant `<meta>` in the document
headers:

- `CLAIM_GOOGLE`
- `CLAIM_BING`

Each one of those should be filled according to the values provided by
Google/Bing on their respective websites for webmasters:

- [Google Search Console](https://www.google.com/webmasters/tools/dashboard?pli=1)
- [Bing Webmaster tools](https://www.bing.com/webmaster/configure/verify/ownership)

Once configured and when site is regenerated, the header should be there.
83 changes: 83 additions & 0 deletions documentation/content/Supported Plugins/photogallery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Title: Photo gallery plugin
Tags: pelican-theme, pelican-plugin, photo-gallery
Category: Supported Plugins
Date: 2019-06-09 10:49
Slug: how-to-use-photos-plugin
Subtitle:
Summary: Elegant integrates 'photos' gallery plugin of Pelican out of the box
Keywords: photos, gallery, photogallery

In order to easily work with Photos, Pelican has a plugin for [photos](https://github.com/getpelican/pelican-plugins/tree/master/photos) that allows to easily show folders of pictures inside an article.

The relevant template for article has been already incorporated in Pelican, so last steps are to add to you requirements the ones for this plugin `Pillow` and optionally `Piexif`.

## Setup

Elegant supports it out of the box. You just have to enable it in your Pelican
configuration,

:::python
PLUGINS = ['photos']

Refer to the plugin documentation for configuration, but at the time of this writing, the settings are:

`PHOTO_LIBRARY = "~/Pictures"`
: Absolute path to the folder where the original photos are kept, organized in sub-folders.

`PHOTO_GALLERY = (1024, 768, 80)`
: For photos in galleries, maximum width and height, plus JPEG quality as a percentage. This would typically be the size of the photo displayed when the reader clicks a thumbnail.

`PHOTO_ARTICLE = (760, 506, 80)`
: For photos associated with articles, maximum width, height, and quality. The maximum size would typically depend on the needs of the theme. 760px is suitable for the theme `notmyidea`.

`PHOTO_THUMB = (192, 144, 60)`
: For thumbnails, maximum width, height, and quality.

`PHOTO_SQUARE_THUMB = False`
: Crops thumbnails to make them square.

`PHOTO_RESIZE_JOBS = 5`
: Number of parallel resize jobs to be run. Defaults to 1.

`PHOTO_WATERMARK = True`
: Adds a watermark to all photos in articles and pages. Defaults to using your site name.

`PHOTO_WATERMARK_TEXT' = SITENAME`
: Allow the user to change the watermark text or remove it completely. By default it uses [SourceCodePro-Bold](http://www.adobe.com/products/type/font-information/source-code-pro-readme.html) as the font.

`PHOTO_WATERMARK_IMG = ''`
: Allows the user to add an image in addition to or as the only watermark. Set the variable to the location.

**The following features require the piexif library**
`PHOTO_EXIF_KEEP = True`
: Keeps the exif of the input photo.

`PHOTO_EXIF_REMOVE_GPS = True`
: Removes any GPS information from the files exif data.

`PHOTO_EXIF_COPYRIGHT = 'COPYRIGHT'`
: Attaches an author and a license to the file. Choices include: - `COPYRIGHT`: Copyright - `CC0`: Public Domain - `CC-BY-NC-ND`: Creative Commons Attribution-NonCommercial-NoDerivatives - `CC-BY-NC-SA`: Creative Commons Attribution-NonCommercial-ShareAlike - `CC-BY`: Creative Commons Attribution - `CC-BY-SA`: Creative Commons Attribution-ShareAlike - `CC-BY-NC`: Creative Commons Attribution-NonCommercial - `CC-BY-ND`: Creative Commons Attribution-NoDerivatives

`PHOTO_EXIF_COPYRIGHT_AUTHOR = 'Your Name Here'`
: Adds an author name to the photo's exif and copyright statement. Defaults to `AUTHOR` value from the `pelicanconf.py`

Lightbox is enabled by default. You can disable it with `PHOTOS_LIGHTBOX` variable. Set it to `FALSE` in your configuration to disable.

```
PHOTOS_LIGHTBOX = False
```

## How to use it in your articles

In order to use it, in your `YAML` preamble of articles, add a line like this:

`gallery: {filename}gallery-source/foldername`

In order for the plugin to work, place your pictures in the folder defined by `PHOTO_LIBRARY`, for example:
`~/www/content/gallery-source/foldername`

The `photos` plugin will process the images, resize, include the watermark, etc and store in the output folder. Images will only be reprocessed if those are removed from the `output` folder, this allows to save time when processing big galleries.

This is an example of the final result:

![]({static}../images/photogallery.png)
Binary file added documentation/content/images/photogallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit af6f152

Please sign in to comment.