Skip to content

Commit

Permalink
Creating the Jekyll blog with theme
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieschoute committed Feb 28, 2017
1 parent 0899d86 commit 714f928
Show file tree
Hide file tree
Showing 35 changed files with 45 additions and 381 deletions.
4 changes: 3 additions & 1 deletion 404.md
Expand Up @@ -5,9 +5,11 @@ permalink: /404.html

# 404

Sorry, we can't seem to find this page's pixylls.
Sorry, this page cannot be found.

<div class="mt3">
<a href="{{ site.baseurl }}/" class="button button-blue button-big">Home</a>
{% comment %}
<a href="{{ site.baseurl }}/contact/" class="button button-blue button-big">Contact</a>
{% endcomment %}
</div>
2 changes: 1 addition & 1 deletion CNAME
@@ -1 +1 @@
pixyll.com
quasci.com
226 changes: 6 additions & 220 deletions README.md
@@ -1,223 +1,9 @@
# Pixyll
# QuaSci.com
QuaSci.com is a quasi-scholarly blog on quantum science.
Posts are related to research and general research life.

[pixyll.com](http://www.pixyll.com)

![Pixyll screenshot](https://cloud.githubusercontent.com/assets/1424573/3847467/134aa236-1e66-11e4-8421-4e8c122118dc.png)

Pixyll is a simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff. It's mobile _first_, fluidly responsive, and delightfully lightweight.

It's pretty minimal, but leverages large type and drastic contrast to make a statement, on all devices.

This Jekyll theme was crafted with <3 by [John Otander](http://johnotander.com)
([@4lpine](https://twitter.com/4lpine)).

中文版 <https://github.com/ee0703/pixyll-zh-cn>.

## Getting Started

If you're completely new to Jekyll, I recommend checking out the documentation at <http://jekyllrb.com> or there's a tutorial by [Smashing Magazine](http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/).

```
$ git clone git@github.com:johnotander/pixyll.git
$ cd pixyll
$ gem install bundler # If you don't have bundler installed
$ bundle install
```

If you don't want to install anything in your local machine, you can create a free development environment for this Pixyll project in the cloud on [Nitrous.io](https://www.nitrous.io) by clicking the button below.

<a href="https://www.nitrous.io/quickstart">
<img src="https://nitrous-image-icons.s3.amazonaws.com/quickstart.png" alt="Nitrous Quickstart" width=142 height=34>
</a>

In the IDE, start Pixyll via `Run > Start Pixyll` and access your site via `Preview > 3000`.

#### Verify your Jekyll version

It's important to also check your version of Jekyll since this project uses Native Sass which
is [only supported by 2.0+](http://jekyllrb.com/news/2014/05/06/jekyll-turns-2-0-0/).

### Fork, then clone

Fork the repo, and then clone it so you've got the code locally.

### Modify the `_config.yml`

The `_config.yml` located in the root of the Pixyll directory contains all of the configuration details
for the Jekyll site. The defaults are:

```yml
# Site settings
title: Pixyll
email: your_email@example.com
author: John Otander
description: "A simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff."
baseurl: ""
url: "http://pixyll.com"

# Build settings
markdown: kramdown
permalink: pretty
paginate: 3
```

### Jekyll Serve

Then, start the Jekyll Server. I always like to give the `--watch` option so it updates the generated HTML when I make changes.

```
$ jekyll serve --watch
```

Now you can navigate to `localhost:4000` in your browser to see the site.

### Using Github Pages

You can host your Jekyll site for free with Github Pages. [Click here](https://pages.github.com/) for more information.

#### A configuration tweak if you're using a gh-pages sub-folder

In addition to your github-username.github.io repo that maps to the root url, you can serve up sites by using a gh-pages branch for other repos so they're available at github-username.github.io/repo-name.

This will require you to modify the `_config.yml` like so:

```yml
# Site settings
title: Repo Name
email: your_email@example.com
author: John Otander
description: "Repo description"
baseurl: "/repo-name"
url: "http://github-username.github.io"

# Build settings
markdown: kramdown
permalink: pretty
paginate: 3
```

This will ensure that the the correct relative path is constructed for your assets and posts. Also, in order to run the project locally, you will need to specify the blank string for the baseurl: `$ jekyll serve --baseurl ''`.

##### If you don't want the header to link back to the root url

You will also need to tweak the header include `/{{ site.baseurl }}`:

```html
<header class="site-header px2 px-responsive">
<div class="mt2 wrap">
<div class="measure">
<a href="{{ site.url }}/{{ site.baseurl }}">{{ site.title }}</a>
<nav class="site-nav right">
{% include navigation.html %}
</nav>
</div>
</div>
</header>
```

A relevant Jekyll Github Issue: <https://github.com/jekyll/jekyll/issues/332>

### Contact Form

The contact form uses <http://formspree.io>. It will require you to fill the form out and submit it once, before going live, to confirm your email.

More setup instructions and advanced options can be found at [http://formspree.io](http://formspree.io/)

### Disqus

To configure Disqus, set up a [Disqus site](https://disqus.com/admin/create/) with the same name as your site. Then, in `_config.yml`, edit the `disqus_shortname` value to enable Disqus.

### Customizing the CSS

All variables can be found in the `_sass/_variables.scss` file, toggle these as you'd like to change the look and feel of Pixyll.

### Page Animation

If you would like to add a [fade-in-down effect](http://daneden.github.io/animate.css/), you can add `animated: true` to your `_config.yml`.

### AnchorJS

[AnchorJS](https://github.com/bryanbraun/anchorjs): _A JavaScript utility for adding deep anchor links to existing page content. AnchorJS is lightweight, accessible, and has no dependencies._ You can turn it on by toggling `enable_anchorjs`. Because it offers many ways for customization, tweaks should be done in `_includes/footer.html`. Default settings after turning AnchorJS on are:

```html
<script>
anchors.options.visible = 'always';
anchors.add('article h2, article h3, article h4, article h5, article h6');
</script>
```

See [documentation](http://bryanbraun.github.io/anchorjs/#basic-usage) for more options.

### Put in a Pixyll Plug

If you want to give credit to the Pixyll theme with a link to <http://pixyll.com> or my personal website <http://johnotander.com> somewhere, that'd be awesome. No worries if you don't.

### Web analytics and search engines

You can measure visits to your website either by using [Google Analytics](https://www.google.com/analytics/) tracking embed or the more advanced [Google Tag Manager](https://www.google.com/analytics/tag-manager/) container.
* For Google Analytics set up the value for `google_analytics`, it should be something like `google_analytics: UA-XXXXXXXX-X`.
* For Google Tag Manager set up the value for `google_tag_manager`, it should be something like: `google_tag_manager: GTM-XXXXX`.
* _Do not_ set both of above methods because this will cause conflicts and skew your reporting data.
* Remember that you need to properly configure the GTM container in its admin panel if you want it to work. More info is available in [GTM's docs](https://www.google.com/analytics/tag-manager/resources/).

Your website is, by default, set to be allowed for crawling and indexing by search engines. (Unless you made yourself a custom robots.txt file). You can use front matter settings on each page to control how search engines will it. Sometimes you may want to exclude a particular page from indexing or forbid Google to store a copy of your page in its cache. It is up to you. Use the `meta_robots` frontmatter key and assign values based on [this table](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag?hl=en#valid-indexing--serving-directives). Some examples:

```yaml
# exclude page from index
meta_robots: noindex

# allow indexing, disallow caching
meta_robots: noarchive

# allow indexing, disallow crawling links
meta_robots: nofollow

# disallow indexing, follow links
meta_robots: noindex,follow
```

In order to get more information about your website's status in search engines, you can register it in [Google Search Console](https://www.google.com/webmasters/tools/home) and/or [Bing Webmaster Tools](http://www.bing.com/toolbox/webmaster). Both these tools will ask you to authorize your website with them and there are couple of ways to do that. Pixyll supports verification via meta tags - just fill in values for `google_verification` and/or `bing_verification` in `_config.yml`, the verification strings and meta tags will then be added automatically.

If search engine optimization is your thing, you can also set up `meta_description` values for each page/post. By default Pixyll uses `summary` to populate the `<meta name="description" content="...">` tag and falls back to `description` from `_config.yml` if `summary` is not present in page/post's front matter. The `summary` is also used for generating Open Graph tags. Why would you want to use a dedicated variable for meta description? Because character limit to properly display this description in search results (as a snippet) is way smaller than in Open Graph. It is recommended to keep it at 155-160 characters, for more in-depth info read [this article](https://moz.com/blog/i-cant-drive-155-meta-descriptions-in-2015).

And lastly - if you happen to write in language other than English be sure to change `og_locale` in `_config.yml` to reflect it.

### Enjoy

I hope you enjoy using Pixyll. If you encounter any issues, please feel free to let me know by creating an [issue](https://github.com/johnotander/pixyll/issues). I'd love to help.

## Upgrading Pixyll

Pixyll is always being improved by its users, so sometimes one may need to upgrade.

#### Ensure there's an upstream remote

If `git remote -v` doesn't have an upstream listed, you can do the following to add it:

```
git remote add upstream https://github.com/johnotander/pixyll.git
```

#### Pull in the latest changes

```
git pull upstream master
```

There may be merge conflicts, so be sure to fix the files that git lists if they occur. That's it!

## Thanks to the following

* [BASSCSS](http://basscss.com)
* [Jekyll](http://jekyllrb.com)
* [Refills](http://refills.bourbon.io/)
* [Solarized](http://ethanschoonover.com/solarized)
* [Animate.css](http://daneden.github.io/animate.css/)
See the website at [quasci.com](http://quasci.com).

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
You can contribute by making a pull request on GitHub, creating an issue, or by sending me a mail using
the email icon on the website.
13 changes: 0 additions & 13 deletions README.nitrous.md

This file was deleted.

20 changes: 11 additions & 9 deletions _config.yml
@@ -1,10 +1,12 @@
# Site settings
title: Pixyll
email: your_email@example.com
author: John Otander
description: "A simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff."
title: "QuaSci: Quantum Science"
email:
author: Eddie Schoute
description: >
QuaSci.com is a quasi-scholarly blog on quantum science.
Posts are related to research and general research life.
baseurl: ""
url: "http://pixyll.com"
url: "http://quasci.com"
date_format: "%b %-d, %Y"

# Google services
Expand All @@ -20,15 +22,15 @@ bing_verification:
animated: false
show_related_posts: false
show_post_footers: false
show_social_icons: false
show_social_icons: true
ajaxify_contact_form: false
enable_mathjax: false
enable_mathjax: true
extended_fonts: false
enable_anchorjs: false

# Disqus post comments
# (leave blank to disable Disqus)
disqus_shortname:
disqus_shortname: quasci

# Facebook Comments plugin
# (leave blank to disable Facebook Comments, otherwise set it to true)
Expand All @@ -37,7 +39,7 @@ facebook_appid:
facebook_comments_number: 10

# Social icons
github_username:
github_username: eddieschoute/quasci.com
bitbucket_username:
stackoverflow_id:
twitter_username:
Expand Down
Expand Up @@ -10,7 +10,7 @@ There is a significant amount of subtle, yet precisely calibrated, styling to en
that your content is emphasized while still looking aesthetically pleasing.

All links are easy to [locate and discern](#), yet don't detract from the [harmony
of a paragraph](#). The _same_ goes for italics and __bold__ elements. Even the the strikeout
of a paragraph](#). The _same_ goes for italics and __bold__ elements. Even the strikeout
works if <del>for some reason you need to update your post</del>. For consistency's sake,
<ins>The same goes for insertions</ins>, of course.

Expand Down
5 changes: 3 additions & 2 deletions _includes/footer.html
@@ -1,11 +1,12 @@
{% if site.description %}
<footer class="center">
<div class="measure">
<small>
Theme crafted with &lt;3 by <a href="http://johnotander.com">John Otander</a> (<a href="https://twitter.com/4lpine">@4lpine</a>).<br>
&lt;/&gt; available on <a href="https://github.com/johnotander/pixyll">Github</a>.
{{ site.description }}
</small>
</div>
</footer>
{% endif %}
{% if site.enable_anchorjs %}<!-- AnchorJS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.0.0/anchor.min.js"></script>
<script>
Expand Down
11 changes: 2 additions & 9 deletions _includes/head.html
Expand Up @@ -61,21 +61,14 @@
<meta name="twitter:description" content="{% if page.summary %}{{ page.summary }}{% else %}{{ site.description }}{% endif %}" />
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}" />

{% comment %}
<!-- Icons -->
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
{% endcomment %}

{% if site.google_analytics %}
<script type="text/javascript">
Expand Down
2 changes: 2 additions & 0 deletions _includes/navigation.html
Expand Up @@ -3,8 +3,10 @@
<a href="{{ page.url }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
{% comment %}
{% for page in site.pages %}
{% if page.tags contains "contact" %}
<a href="{{ page.url }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
{% endcomment %}
3 changes: 3 additions & 0 deletions _includes/social_links.html
Expand Up @@ -22,9 +22,12 @@
{% if site.google_plus_id %}
<a class="fa fa-google-plus" href="https://plus.google.com/{{ site.google_plus_id }}/posts"></a>
{% endif %}
<a class="fa fa-envelope" href="http://www.google.com/recaptcha/mailhide/d?k=01bORbraFoTrT6KYNphpMtVQ==&amp;c=q_pE-kA8bAHg6YIU7QSlmYMoheGbwwX6MOP5tISq3-M=" onclick="window.open('http://www.google.com/recaptcha/mailhide/d?k\x3d01bORbraFoTrT6KYNphpMtVQ\x3d\x3d\x26c\x3dq_pE-kA8bAHg6YIU7QSlmYMoheGbwwX6MOP5tISq3-M\x3d', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address"></a>
{% comment %}
{% if site.email %}
<a class="fa fa-envelope" href="mailto:{{ site.email }}"></a>
{% endif %}
{% endcomment %}
{% if site.linkedin_username %}
<a class="fa fa-linkedin" href="https://www.linkedin.com/in/{{ site.linkedin_username }}"></a>
{% endif %}
Expand Down
9 changes: 0 additions & 9 deletions _posts/2014-06-08-pixyll-has-pagination.md

This file was deleted.

0 comments on commit 714f928

Please sign in to comment.