Skip to content

Commit

Permalink
Merge pull request #415 from Pelican-Elegant/fix-docs
Browse files Browse the repository at this point in the history
Fix docs
  • Loading branch information
talha131 authored Jul 3, 2019
2 parents 74a6fae + 59826df commit 34985d9
Show file tree
Hide file tree
Showing 54 changed files with 432 additions and 474 deletions.
112 changes: 2 additions & 110 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,3 @@
# Where do I start?
See our documentation at following link

Developing Elegant is a community effort, so you are very welcome to help develop it further into the most elegant theme out there.

The main repository of Elegant is on [GitHub][elegant], which you may fork and then submit pull requests to, in order for them to be merged.

If you found any issues, or have ideas how to improve the theme, please submit an [issue].

Also see issues tagged as [Pull Request Welcome](https://github.com/Pelican-Elegant/elegant/labels/pull%20request%20welcome) – these are issues that are not directly on our roadmap, but if you have time to contribute, we would be very glad to review and accept your pull request.

If you want to contribute to documentation instead, do so in the [documentation repository][documentation]. Some easy tasks to tackle there are tagged as [Good First Issue](https://github.com/Pelican-Elegant/documentation/labels/good%20first%20issue)

# Contributing Code

1. Create a new git branch specific to your changes, instead of making your commits in the master branch. For example, create a branch `fix-issue-119` and add commits to it that fix “issue 119”.
2. Update the [CHANGELOG]
3. Create pull request from your fix branch, say `fix-issue-119`, against `next` branch of Elegant. (We use `master` branch to make new releases. `next` is used for development.)
4. Each pull request should only have a single feature or fix. Do not add multiple features or bug fixes to the same pull request.
5. Squash your commits to reduce noise from commit history. Use your better judgement to decide which commits should stay in the commit history, or consult project maintainers if confused.
6. Have (at least) one other active contributor review your code.
7. Once at least one code reviewer has approved it, it will can be merged.

## Git Tips for Newcomers

Here are some tips on how to make your life with Git easier when contributing.

### How To Set Up Your Git

1. Create a fork of the [Elegant repository][elegant] by clicking on the “Fork” button.
2. Clone your fork to your computer by clicking on the “Clone or download” button and following the instructions there.
3. When in the Git repository of your fork, run the following command to set the main repository as the upstream: `git remote add upstream https://github.com/Pelican-Elegant/pelican-elegant.git`

### Updating/Rebasing to Upstream

Occasionally – often before a pull request is able to be merged – you will need to update your own (fork) repository to the upstream (i.e. [Elegant][elegant]) development (i.e. `next`) branch. This can be done as follows:

1. `git fetch upstream next`
2. `git rebase upstream/next`

### Squash Commits & More Complex Rebasing

When creating a pull request in GitHub, you have the option to squash all commits, but sometimes you need to fix either the mess you made or some clashes that prevent a merge of the two branches.

In both cases, the following command is your Swiss-army knife:

`git rebase --interactive upstream/master`

For more on the interactive rebase command of Git, see [its official documentation][git_rebase].

[git_rebase]: https://git-scm.com/docs/user-manual#interactive-rebase

# New Features and Styles

If you plan to add new features to the theme, please make sure that:

- you set sensible defaults so the theme works out of the box, without forcing the user to set any variable
- your changes do not negatively effect readability and reading experience
- your changes do not cause distraction for the reader
- any bigger features should go through the voting process (see below)

# Code style

Please make sure to follow the code style of the existing code base.

Specifically:

## Code/Template Formatting Rules

- use single (`''`) rather than double (`""`) quotation marks for Jinja strings
- in Jinja print statements, surround the variable with spaces inside curly braces – for example: `{{ foo.bar }}`
- use double (`""`) quotation marks around HTML attributes
- end files with a newline

## CSS Formatting Rules

- font name’s first letter should be capital
- add a space after comma
- declarations should be sorted alphabetically
- use a single space between the last selector and the opening brace that begins the declaration block
- group together related classes and identities
- add a space after colon
- remove leading 0s
- remove unit specification after 0 values
- use three-digit Hex notation for colors wherever possible
- use hyphen `-` instead of underscore `_` in class and identity names

Refer to [Google's HTML/CSS Style Guide][google_style_guide] for all other formatting rules.

# Voting Process

Any new features, bigger changes, decisions on what should constitute the next milestone or wider goals etc. should go through a vote, as follows.

1. Open a new issue to describe it and to kick-start a discussion.
1. As soon as a suggestion (or several) are set in place, set a deadline, no shorter than 10 days. Also at this stage tag the issue with the “vote” label.
1. People can vote with the :+1: and :-1: emoji on individual suggestions. Anyone may cast votes for as many suggestions as they want.
1. At the end of the deadline, the suggestion with most votes (= № of :+1: - № of :-1:) is taken.

# Licensing (Inbound=Outbound)

All contributions will be understood to be made under the same (inbound) license as the main (outbound) license of the repository it is being contributed to – so [MIT License][] for all [code/theme][elegant] contributions, and [CC-BY-SA-3.0][] for all [documentation][] contributions.

If you are contributing code that is not yours, make sure to indicate where you got the code from (and who the author/copyright holder is) and what license you got it under.

[cc-by-sa-3.0]: https://spdx.org/licenses/CC-BY-SA-3.0.html
[changelog]: https://github.com/Pelican-Elegant/elegant/blob/master/CHANGELOG.md
[contributing]: ./CONTRIBUTING.md
[documentation]: https://github.com/Pelican-Elegant/documentation
[elegant]: https://github.com/Pelican-Elegant/elegant
[google_style_guide]: https://google.github.io/styleguide/htmlcssguide.html
[issue]: https://github.com/Pelican-Elegant/elegant/issues/
[mit license]: https://spdx.org/licenses/MIT.html
http://localhost:9000/categories.html#contributing-ref
6 changes: 4 additions & 2 deletions documentation/content/Analytics/google-analytics.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
Title: How to use Google Analytics
Tags: web-analytics
Category: Analytics
Date: 2013-11-11 23:05
Slug: how-to-use-google-analytics
Disqus_identifier: cf14ac5-how-to-use-google-analytics
Subtitle:
Summary: Elegant Pelican theme supports Google Analytics out of
the box. This articles describes how to set it up.
Summary: Elegant Pelican theme supports Google Analytics out of the box. This articles describes how to set it up.
Keywords:
authors: Talha Mansoor
---

Elegant supports the popular web tracking service,
[Google Analytics](http://www.google.com/analytics/).
Expand Down
6 changes: 4 additions & 2 deletions documentation/content/Analytics/stat-counter.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
Title: How to use StatCounter
Tags: web-analytics
Category: Analytics
Date: 2013-11-11 23:05
Slug: how-to-use-statcounter-analytics
Disqus_identifier: 4kv80xq-how-to-use-statcounter
Subtitle:
Summary: Elegant Pelican theme supports StatCounter out of
the box. This articles describes how to set them up.
Summary: Elegant Pelican theme supports StatCounter out of the box. This articles describes how to set them up.
Keywords:
authors: Talha Mansoor
---

Elegant has support for popular web tracking service,
[StatCounter](http://statcounter.com/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: 2013-08-27 23:20
comments: false
Slug: article-subtitle
Category: Appearance & Style
authors: Talha Mansoor
---

Pelican lets you define title of your article in the meta data. Elegant adds
Expand Down
3 changes: 3 additions & 0 deletions documentation/content/Appearance and Style/modified-date.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
Title: How does modified metadata works
Tags: web-design, meta-data, date
Category: Appearance & Style
Expand All @@ -7,6 +8,8 @@ Disqus_identifier: q4nz2k0-how-does-modified-metadata-works
Subtitle:
Summary: Use modified metadata to show the date at which you last updated the article
Keywords:
authors: Talha Mansoor
---

You need to update your articles time and again. Sometimes it makes sense to
display the date when you updated the article. You can show the last updated
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Appearance and Style/page-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: 2013-08-27 23:20
comments: false
Slug: page-title
Category: Appearance & Style
authors: Talha Mansoor
---

Elegant follows following format for the `<title>` tag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
Title: How Elegant displays Table of Contents
Tags: reST, markdown, navigation, web-design, contents
Category: Appearance & Style
Expand All @@ -7,6 +8,8 @@ Disqus_identifier: lm95rjd-how-elegant-displays-table-of-contents
Subtitle:
Summary: Elegant shows Table of Contents, if available, non intrusively to give a clean reading experience to the visitor
Keywords:
authors: Talha Mansoor
---

[TOC]

Expand Down
3 changes: 3 additions & 0 deletions documentation/content/Appearance and Style/web-safe-fonts.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
Title: Web Safe Fonts
Tags: web-design
Category: Appearance & Style
Date: 2014-04-22 16:23
Slug: web-safe-fonts
authors: Talha Mansoor
---

Elegant uses commonly available typefaces in every style rule. It has a list of
closely matching fonts in the fallback list.
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Code Snippets/code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: 2013-08-27 23:20
comments: false
Slug: code-snippets-theme
Category: Code Snippets
authors: Talha Mansoor
---

Elegant uses [Solarized](http://ethanschoonover.com/solarized) theme for syntax
Expand Down
22 changes: 22 additions & 0 deletions documentation/content/Code Snippets/custome-syntax-theme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
Title: Change Syntax Highlight Theme
Tags: unique
Date: 2019-07-03 20:18
Slug: change-syntax-highlight-theme
Category: Code Snippets
authors: Talha Mansoor
---

Elegant uses [Solarized theme](http://ethanschoonover.com/solarized) for syntax
highlighting. To replace it, copy contents of your preferred theme's CSS style
sheet into `custom.css`.

Alternatively, you can replace contents of `pygments.css` with your theme's
style sheet.

If you feel like experimenting with different themes then [this
repository](https://github.com/uraimo/pygments-vimstyles) has Pygments CSS of
Vim themes. [This one](https://github.com/richleland/pygments-css) has Pygments
CSS of built-in styles. Do not forget to change `.codehilite` CSS class
identifier to `.highlight`. Code blocks in Pelican generated HTML use
`.highlight` class.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
Title: Display Line Numbers in Code Snippets
Tags: markdown, reST, code-snippets, gist
Category: Code Snippets
Expand All @@ -6,6 +7,8 @@ Slug: display-line-numbers-in-code-snippets
Subtitle:
Summary: reStructuredText and Markdown have directives that generate line numbers for code blocks. Use them to display line numbers in code snippets.
Keywords: codehilite, python-markdown
authors: Talha Mansoor
---

reStructuredText and Markdown have directives that generate line numbers for
code snippets. Install [Pygments](http://pygments.org/) to use these directives.
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Comments/collapsible-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: 2013-08-27 23:20
comments: false
Slug: collapsible-comments
Category: Commenting
authors: Talha Mansoor
---

Readers use scroll bar to track their progress when reading inside their
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Comments/comment-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ date: 2019-06-30 22:29
comments: false
Slug: comments-thread-id
Category: Commenting
authors: Talha Mansoor
---

Most Pelican themes pass article URL to Disqus as the [Disqus
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Comments/disable-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ date: 2019-01-12 16:29
comments: false
Slug: disable-comments-per-article
Category: Commenting
authors: Talha Mansoor
---

If you remove your comment service configuration, say you set `DISQUS_SITENAME` to empty string, then comments will disappear from all the articles.
Expand Down
3 changes: 3 additions & 0 deletions documentation/content/Comments/disqus-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
Title: Enable Disqus Comments
Tags: interaction
Category: Commenting
Expand All @@ -6,6 +7,8 @@ Slug: enable-disqus-comments
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
---

You can use Disqus for comments. You have to set `DISQUS_SITENAME` to Disqus
site name identifier in configuration to enable comments.
Expand Down
1 change: 1 addition & 0 deletions documentation/content/Comments/invite-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: 2014-04-21 16:39
comments: false
Slug: invite-visitors-comment
Category: Commenting
authors: Talha Mansoor
---

Instead of just throwing in comments form at the end of every article, Elegant
Expand Down
13 changes: 13 additions & 0 deletions documentation/content/Contributing/adding-new-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
Title: Contributing New Features
Date: 2019-07-03 22:17
Slug: contributing-new-features
Category: Contributing
authors: Talha Mansoor
---

If you plan to add new features to the theme, please make sure that:

- you set sensible defaults so the theme works out of the box, without forcing the user to set any variable
- your changes do not negatively effect readability and reading experience
- your changes do not cause distraction for the reader
34 changes: 34 additions & 0 deletions documentation/content/Contributing/beginners-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
Title: Git Tips for Beginners
Date: 2019-07-03 21:57
Slug: git-tips-for-beginners
Category: Contributing
---

Here are some tips on how to make your life with Git easier when contributing.

## How To Set Up Your Git

1. Create a fork of the [Elegant repository][elegant] by clicking on the “Fork” button.
2. Clone your fork to your computer by clicking on the “Clone or download” button and following the instructions there.
3. When in the Git repository of your fork, run the following command to set the main repository as the upstream: `git remote add upstream https://github.com/Pelican-Elegant/pelican-elegant.git`

## Updating/Rebasing to Upstream

Occasionally – often before a pull request is able to be merged – you will need to update your own (fork) repository to the upstream (i.e. [Elegant][elegant]) development (i.e. `next`) branch. This can be done as follows:

1. `git fetch upstream next`
2. `git rebase upstream/next`

## Squash Commits & More Complex Rebasing

When creating a pull request in GitHub, you have the option to squash all commits, but sometimes you need to fix either the mess you made or some clashes that prevent a merge of the two branches.

In both cases, the following command is your Swiss-army knife:

`git rebase --interactive upstream/master`

For more on the interactive rebase command of Git, see [its official documentation][git_rebase].

[git_rebase]: https://git-scm.com/docs/user-manual#interactive-rebase
[elegant]: https://github.com/Pelican-Elegant/elegant
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
Title: Elegant grows into a community-led project
Tags: project-management
Category: Announcements
Category: Contributing
Date: 2019-01-05 19:40
Slug: community-led-project
Subtitle: The beginning of a beautiful friendship
Expand Down
15 changes: 15 additions & 0 deletions documentation/content/Contributing/contributing-license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
Title: Contributions Licesne
Date: 2019-07-03 22:07
Slug: contribution-license
Category: Contributing
---

All contributions will be understood to be made under the same (inbound) license as the main (outbound) license of the repository it is being contributed to – so [MIT License][] for all code/theme contributions, and [CC-BY-SA-3.0][] for all documentation contributions.

If you are contributing code that is not yours, make sure to indicate where you got the code from (and who the author/copyright holder is) and what license you got it under.

[cc-by-sa-3.0]: https://spdx.org/licenses/CC-BY-SA-3.0.html
[documentation]: https://github.com/Pelican-Elegant/documentation
[elegant]: https://github.com/Pelican-Elegant/elegant
[mit license]: https://spdx.org/licenses/MIT.html
22 changes: 22 additions & 0 deletions documentation/content/Contributing/inviation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
Title: Invitation to participate
Date: 2019-07-03 20:07
Slug: invitation-to-participate
Category: Contributing
---

Our brand new documentation website [elegant.onCrashReboot.com][elegant-home] is a great demo for the theme.

If you like the theme and would like to contribute to Elegant, you are most welcome to do so. Even though Pelican is written in Python, no coding skills are needed to help out with Elegant, as themes consist mostly of [Jinja][] templates, CSS and HTML. It is honestly very easily to get into.

If you want to help out, but have no idea where to start, we keep a list of [low-priority features that are just waiting for you to pick up][pr_welcome].

Another way to contribute is to help with the [documentation][docs]. We are keeping a list of [good first issues][docs_first] for newbies to get involved – these are easy to tackle, but in no way less helpful.

And, of course, reporting bugs and filing feature requests to further improve Elegant (and its documentation), is also welcome.

[jinja]: http://jinja.pocoo.org/
[pr_welcome]: https://github.com/Pelican-Elegant/elegant/labels/pull%20request%20welcome
[docs]: https://github.com/Pelican-Elegant/elegant/tree/master/documentation
[docs_first]: https://github.com/Pelican-Elegant/elegant/issues?q=is%3Aopen+is%3Aissue+label%3A%22project+documentation%22
[elegant-home]: https://elegant.oncrashreboot.com
Loading

0 comments on commit 34985d9

Please sign in to comment.