Skip to content

Commit

Permalink
Merge pull request #471 from Pelican-Elegant/next
Browse files Browse the repository at this point in the history
Next release
  • Loading branch information
talha131 authored Jul 30, 2019
2 parents 7e27203 + b86e13d commit 92bf448
Show file tree
Hide file tree
Showing 44 changed files with 921 additions and 325 deletions.
7 changes: 7 additions & 0 deletions .yaspeller.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
"https",
"Iconifier.net",
"ijvxwtg",
"ImageOptim",
"imgur",
"Inkscape",
"io",
"iOS",
"iranzo",
Expand Down Expand Up @@ -136,6 +138,7 @@
"metatag",
"metatags",
"Miguel",
"minification",
"Mohamed",
"Mohanan",
"monetization",
Expand Down Expand Up @@ -187,11 +190,14 @@
"sidebars",
"silverhook",
"sitemap",
"Smalllike",
"solarized",
"SourceCodePro",
"StatCounter",
"statcounter",
"sudo",
"svgexport",
"svgo",
"takeaways",
"talha",
"Talha's",
Expand All @@ -210,6 +216,7 @@
"tshepang",
"tshepang_dev",
"uncollapsed",
"understandability",
"unhide",
"unordered",
"validator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ I will end my example here.
### Hide Default Title Text

!!! note "Possibly Deprecated"
We couldn't not reproduce this issue in our testing. This should be considered deprecated, but is retained in this document in case someone encounters this.

We couldn't not reproduce this issue in our testing. This should be considered deprecated, but is retained in this document in case someone encounters this.

Using the default configuration, reStructuredText will generate a default title for the table
of contents. According to the [official
Expand Down
29 changes: 19 additions & 10 deletions documentation/content/Appearance and Style/warnings-admonitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,40 +50,48 @@ Let's see some examples!
You can use either `danger` or `error` to get a red admonition box.

!!! danger

This is a danger or error admonition

!!! danger
This is a danger or error admonition

This is a danger or error admonition

## Default Attention, Caution, Warning

An `attention`, `caution` or `warning` admonition will be yellow.

!!! warning

This is an attention, caution or warning admonition

!!! warning
This is an attention, caution or warning admonition

This is an attention, caution or warning admonition

## Default Important, Note

Use `important` or `note` to get a green admonition box.

!!! important

This is an important or note admonition

!!! important
This is an important or note admonition

This is an important or note admonition

## Default Hint, Tip

Use either `hint` or `tip` to get a blue admonition box.

!!! hint

This is a hint or tip admonition

!!! hint
This is a hint or tip admonition

This is a hint or tip admonition

## Custom Titles

Expand All @@ -93,22 +101,23 @@ If you want to use a custom title, you pass the title in double quotes after the
type of admonition you are utilizing.

!!! hint "Use double quotes to change the title"
This admonition box contains a custom tile because I placed it in double
quotes after the `hint`.

This admonition box contains a custom tile because I placed it in double quotes after the `hint`.

!!! hint "Use double quotes to change the title"
This admonition box contains a custom tile because I placed it in double
quotes after the `hint`.

This admonition box contains a custom tile because I placed it in double quotes after the `hint`.

## No title

There are times when you don't need a title in your boxes. This can be done by
passing an empty string (`""`) after the admonition type.

!!! important ""

This box doesn't require a title, but is still an `important` admonition
and will be highlighted as such.

!!! important ""
This box doesn't require a title, but is still an `important` admonition
and will be highlighted as such.

This box doesn't require a title, but is still an `important` admonition and will be highlighted as such.
13 changes: 10 additions & 3 deletions documentation/content/Appearance and Style/why-look-and-feel.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ article's [Table of Contents]({filename}./table-of-contents.md)
to the left sidebar and displaying it in a smaller font. This allows the table to retain it's
usefulness to the reader while not intruding on the article. In a similar fashion, the right
sidebar is used to relate any other extra information about the article to the user. Elements
that regularly appear in the right sidebar include: Published time, Last Updated time,
Category, Tags, "Stay in Touch" icons, "Monthly Updates" opt-in, and
[Reading Time]({filename}../Supported Plugins/reading-time.md).
that regularly appear in the right sidebar include:

- Category
- Last Updated time
- "Monthly Updates" opt-in
- Published time
- [Reading Time]({filename}../Supported Plugins/reading-time.md)
- [Series section]({filename}../Supported Plugins/multi-part-plugin.md)
- ["Stay in Touch" icons]({filename}../SEO and SMO/social-profiles-sidebar.md)
- Tags
40 changes: 40 additions & 0 deletions documentation/content/Comments/disqus-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,49 @@ comment_id: 9jgwmy8-how-to-use-disqus-comments-elegantly
Subtitle:
Summary: Elegant offers Disqus comments out of the box with few unique features
authors: Talha Mansoor
comment_id: aa8pfjdv5f
disqus_filter: off
---

You can use Disqus for comments. You have to set `DISQUS_SITENAME` to Disqus
site name identifier in configuration to enable comments.

That's it. Elegant will take care of the rest.

You can see a working example of Disqus comments in this article.

## Show Disqus comments by default

Just set `DISQUS_SITENAME` variable.

## Hide Disqus comments by default

Unset `DISQUS_SITENAME` variable.

This is the default setting.

## Hide Disqus comments by default. Show on Selected

1. Set `DISQUS_SITENAME`
1. Set `DISQUS_FILTER` to `True`

This will hide Disqus form on all pages.

Now to show Disqus form on selected posts, in article metadata set

```yaml
disqus_filter: off
```
## Show Disqus comments by default. Hide on Selected
1. Set `DISQUS_SITENAME`
1. Remove `DISQUS_FILTER` or set it to `False` which is its default value

This will hide Disqus form on all pages.

Now to hide Disqus form on selected posts, in article metadata set

```yaml
disqus_filter: on
```
10 changes: 9 additions & 1 deletion documentation/content/Contributing/commitizen.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ Install [Node.js](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.co

If you are on Windows then try installing them with [scoop.sh](https://scoop.sh/). It saves time and makes update easier.

### Step 2: Install gulp
### Step 2: Install Commitizen

Run this command from your command line terminal.

```bash
yarn global add commitizen
```

### Step 3: Initialize the Project

In the root of Elegant repository, run

```bash
yarn install
```

## Use Commitizen

We have already gone through the trouble of making Elegant repository [Commitizen friendly](https://github.com/commitizen/cz-cli#making-your-repo-commitizen-friendly).
Expand Down
51 changes: 51 additions & 0 deletions documentation/content/Contributing/elegant-logo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
Title: Elegant Logo
Date: 2019-07-22 21:17
Slug: elegant-logo
Category: Contributing
Authors: Talha Mansoor
---

Elegant community held a [discussion](https://github.com/Pelican-Elegant/elegant/issues/190) to decide a Logo for the project. We settled on following icon from [Pelican by Smalllike from the Noun Project](https://thenounproject.com/search/?q=pelican&i=2213839).

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 80" x="0px" y="0px" width="250" height="250"><g><path d="M39,25H24V20H35A11.013,11.013,0,0,0,46,9V3a1,1,0,0,0-1-1H19a5.006,5.006,0,0,0-5,5V38A11.013,11.013,0,0,0,25,49h4v7H27a3,3,0,0,0,0,6H37a3,3,0,0,0,0-6H35V49H50V36A11.013,11.013,0,0,0,39,25Zm0,2a8.953,8.953,0,0,1,5.644,2H35v2H46.478a8.962,8.962,0,0,1,1,2H39v2h8.941A8.935,8.935,0,0,1,48,36v1H44v2h4v2H29a3,3,0,0,1-3-3V27Zm-4-9H24V10H43.941A9.01,9.01,0,0,1,35,18ZM24,4H44V8H24ZM16,7a3,3,0,0,1,3-3h3V25H16ZM37,58a1,1,0,0,1,0,2H27a1,1,0,0,1,0-2Zm-4-2H31V49h2Zm15-9H25a9.01,9.01,0,0,1-9-9V27h2v7h2V27h4V38a5.006,5.006,0,0,0,5,5H48Z"/><rect x="18" y="36" width="2" height="2"/><circle cx="20.5" cy="7.5" r="1.5"/></g><text x="0" y="79" fill="#000000" font-size="5px" font-weight="bold" font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif">Created by Smalllike</text><text x="0" y="84" fill="#000000" font-size="5px" font-weight="bold" font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif">from the Noun Project</text></svg>

Building on top of it, some modifications were made to it using [Inkscape](https://inkscape.org/).

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 67 67" width="250" height="250">
<rect width="57.681" height="62.899" x="2.802" y="-11.841" ry="0" fill="none"/>
<rect width="65.83" height="65.83" x=".585" y=".585" ry="2.398" fill="none" stroke="maroon" stroke-width="1.17"/>
<g transform="translate(2.518 1.626)">
<path d="M39 25H24v-5h11A11.013 11.013 0 0046 9V3a1 1 0 00-1-1H19a5.006 5.006 0 00-5 5v31a11.013 11.013 0 0011 11h4v7h-2a3 3 0 000 6h10a3 3 0 000-6h-2v-7h15V36a11.013 11.013 0 00-11-11zm0 2a8.953 8.953 0 015.644 2H35v2h11.478a8.962 8.962 0 011 2H39v2h8.941A8.935 8.935 0 0148 36v1h-4v2h4v2H29a3 3 0 01-3-3V27zm-4-9H24v-8h19.941A9.01 9.01 0 0135 18zM24 4h20v4H24zm-8 3a3 3 0 013-3h3v21h-6zm21 51a1 1 0 010 2H27a1 1 0 010-2zm-4-2h-2v-7h2zm15-9H25a9.01 9.01 0 01-9-9V27h2v7h2v-7h4v11a5.006 5.006 0 005 5h19z" fill="#8b0000"/>
<path d="M18 36h2v2h-2z"/>
<circle cx="20.5" cy="7.5" r="1.5"/>
</g>
<path d="M26.437 7.605V5.578H46.54v4.055H26.437z" fill="#f60"/>
<path d="M26.437 15.625v-4.066h20.08l-.142.768c-.295 1.594-1.123 3.188-2.318 4.465a9.294 9.294 0 01-4.3 2.613c-.763.216-.916.221-7.05.253l-6.27.033z" fill="#fc0"/>
<path d="M31.034 42.573c-1.137-.164-2.058-.933-2.45-2.043l-.124-.353-.012-5.77-.012-5.768h6.68c4.323 0 6.854.016 7.173.045 1.68.152 3.39.8 4.668 1.766l.19.144h-9.66v2.04h11.572l.194.308c.195.31.661 1.251.747 1.508l.047.138h-8.53v2.04h4.499c4.244 0 4.5.004 4.527.074.016.041.04.49.054 1l.025.923h-4.044v2.04h4.031v1.955l-9.66-.005c-5.312-.003-9.774-.022-9.915-.042z" stroke="maroon" stroke-width=".043"/>
<path d="M33.553 54.137v-3.485h1.955v6.969h-1.955zm-4.31 7.426c-.228-.06-.596-.423-.658-.648a.893.893 0 01.054-.682c.107-.229.303-.421.525-.514.112-.047 1.071-.058 5.355-.057 4.97.001 5.226.005 5.387.08.647.296.778 1.177.241 1.62-.32.265-.08.255-5.656.25-3.352-.003-5.138-.02-5.248-.049z" fill="#f60" stroke="maroon" stroke-width=".042"/>
<path d="M2.306 65.641c-.368-.16-.7-.478-.918-.882l-.174-.324V2.614l.19-.387a1.83 1.83 0 011.044-.914c.452-.161 61.652-.161 62.104 0a1.83 1.83 0 011.044.914l.19.387v61.82l-.174.325c-.223.413-.554.726-.936.885-.27.113-3.443.126-31.194.123-27.422-.003-30.924-.017-31.176-.126zm38.526-2.277c.607-.297 1.086-.772 1.422-1.41.21-.398.228-.502.228-1.322 0-.773-.026-.941-.193-1.277a3.304 3.304 0 00-1.449-1.452c-.534-.263-.55-.265-1.896-.292l-1.358-.027v-6.946h14.977l-.028-7.262c-.027-7.004-.034-7.288-.196-7.99-.505-2.194-1.441-3.938-2.97-5.53-1.094-1.14-3.132-2.357-4.7-2.805-1.558-.445-1.538-.445-10.137-.445h-7.95v-4.928l6.21-.03c5.931-.028 6.243-.036 6.939-.196 3.94-.906 7.003-3.602 8.222-7.24.529-1.58.568-1.944.614-5.791.024-1.924.017-3.67-.014-3.88a1.042 1.042 0 00-.325-.648l-.268-.268H34.35c-15.082 0-14.013-.037-15.144.532-.707.356-1.604 1.2-2.01 1.89a6.506 6.506 0 00-.5 1.139l-.189.606V40.97l.183.824c.489 2.207 1.435 3.997 2.914 5.511 1.509 1.546 3.359 2.587 5.521 3.11.607.146 1.021.17 3.54.202l2.853.037v6.931l-1.396.027c-1.313.025-1.423.04-1.855.242-1.7.797-2.304 2.958-1.254 4.489.357.521.954.967 1.551 1.16.464.15.736.157 6.11.14l5.623-.016z" fill="#fff" stroke="#fff" stroke-width=".08093600000000001"/>
<path d="M26.5 48.525c-1.283-.147-2.925-.767-4.049-1.53-1.516-1.03-2.8-2.727-3.402-4.497-.47-1.38-.478-1.525-.478-7.973V28.63h1.942v7.04H22.536v-7.04H26.5v5.846c.002 6.462-.004 6.38.519 7.404.604 1.186 1.532 2.001 2.87 2.522l.535.209 10.014.022 10.013.022V48.615l-11.672-.01c-6.42-.006-11.946-.042-12.28-.08zm-3.964-9.903v-1.011H20.513V39.634H22.536zM18.57 17.394c0-10.175-.029-9.59.525-10.425.316-.475.804-.863 1.403-1.115.329-.138.616-.163 2.18-.19l1.8-.03v1.342c0 .739-.033 1.342-.072 1.342-.04 0-.128-.087-.198-.193-.214-.326-.805-.56-1.308-.518-1.841.153-1.884 2.863-.048 3.039.513.05.9-.085 1.234-.429.148-.153.298-.279.331-.28.033 0 .06 3.75.06 8.334v8.335h-5.906z" fill="#fff" stroke="#fff" stroke-width=".08093600000000001"/>
</svg>

The we cleaned it using [svgo](https://github.com/svg/svgo) tool. It reduced file size by around 50%.

```bash
$ svgo -i elegant_logo.svg --pretty

elegant_logo.svg:
Done in 80 ms!
8.029 KiB - 52.5% = 3.815 KiB
```

Then, we converted SVG to PNG using [svgexport](https://github.com/shakiba/svgexport).

```bash
$ svgexport elegant_logo.svg elegant_logo.png 100%
```

The resultant file was around 1MB is size. So we optimized it using [ImageOptim](https://imageoptim.com/mac), which reduced the file size by 98%.

Your can download the files from our Git repository.

<https://github.com/Pelican-Elegant/elegant/tree/master/elegant-logo>
3 changes: 2 additions & 1 deletion documentation/content/Contributing/live-reload-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ pip install invoke
### Known Issue

!!! Danger "Pretty URLs Do Not Work"
Remove or comment out `ARTICLE_URL = "{slug}"` from Pelican configuration to make LiveReload work

Remove or comment out `ARTICLE_URL = "{slug}"` from Pelican configuration to make LiveReload work

Unfortunately, Pelican LiveReload depends on [Python-LiveReload](https://github.com/lepture/python-livereload), which [does not support extension less files](https://github.com/lepture/python-livereload/pull/131).

Expand Down
Loading

0 comments on commit 92bf448

Please sign in to comment.