Skip to content

Commit

Permalink
a new theme based on minima with support for posts with external links
Browse files Browse the repository at this point in the history
  • Loading branch information
heiderich committed Jan 29, 2018
1 parent 17f909b commit ea31ebf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# minima
# minima-with-external-links

*Minima is a one-size-fits-all Jekyll theme for writers*. It's Jekyll's default (and first) theme. It's what you get when you run `jekyll new`.

[Theme preview](https://jekyll.github.io/minima/)

![minima theme preview](/screenshot.png)
This theme is based on minima. It adds support for posts with external urls.

## Installation

Add this line to your Jekyll site's Gemfile:

```ruby
gem "minima"
gem "minima-with-external-links"
```

And add this line to your Jekyll site:

```yaml
theme: minima
theme: minima-with-external-links
```
And then execute:
Expand All @@ -37,6 +35,7 @@ Refers to files within the `_layouts` directory, that define the markup for your
- `home.html` — The layout for your landing-page / home-page / index-page. [[More Info.](#home-layout)]
- `page.html` — The layout for your documents that contain FrontMatter, but are not posts.
- `post.html` — The layout for your posts.
- `external.html` — The layout for posts with external urls.

### Includes

Expand Down Expand Up @@ -156,7 +155,7 @@ Google Analytics will only appear in production, i.e., `JEKYLL_ENV=production`

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jekyll/minima. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/heiderich/minima-with-external-links. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## Development

Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ minima:

# Build settings
markdown: kramdown
theme: minima
theme: minima-with-external-links
exclude:
- Gemfile
- Gemfile.lock
9 changes: 9 additions & 0 deletions _layouts/external.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ page.title }}</title>

<meta http-equiv="refresh" content="0;url={{ page.external_url }}">
</head>
<body><!-- Google Analytics JavaScript --></body>
</html>
6 changes: 5 additions & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ <h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
<span class="post-meta">{{ post.date | date: date_format }}</span>

<h3>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
{% if post.external_url %}
<a href="{{ post.external_url }}">{{ post.title }}</a>
{% else %}
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
{% endif %}
</h3>
</li>
{% endfor %}
Expand Down
10 changes: 2 additions & 8 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ title: About
permalink: /about/
---

This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/)
This is an extension of the base Jekyll theme [minima](https://github.com/jekyll/minima).
It allows urls of extenal posts, [as described by Caleb Thompson](https://calebthompson.io/external-posts-in-jekyll).

You can find the source code for the Jekyll new theme at:
{% include icon-github.html username="jekyll" %} /
[minima](https://github.com/jekyll/minima)

You can find the source code for Jekyll at
{% include icon-github.html username="jekyll" %} /
[jekyll](https://github.com/jekyll/jekyll)
10 changes: 5 additions & 5 deletions minima.gemspec → minima-with-external-links.gemspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# coding: utf-8

Gem::Specification.new do |spec|
spec.name = "minima"
spec.name = "minima-with-external-links"
spec.version = "2.1.1"
spec.authors = ["Joel Glovier"]
spec.email = ["[email protected]"]
spec.authors = ["Joel Glovier", "Florian Heiderich"]
spec.email = ["[email protected]", "[email protected]"]

spec.summary = %q{A beautiful, minimal theme for Jekyll.}
spec.homepage = "https://github.com/jekyll/minima"
spec.summary = %q{A beautiful, minimal theme for Jekyll with support for external links.}
spec.homepage = "https://github.com/heiderich/minima-with-external-links"
spec.license = "MIT"

spec.metadata["plugin_type"] = "theme"
Expand Down

0 comments on commit ea31ebf

Please sign in to comment.