Skip to content

Commit

Permalink
data and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
smth committed Mar 31, 2016
1 parent 7aa062c commit 5a99384
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 89 deletions.
41 changes: 38 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Solo
# Jekyll One

[Solo](http://chibicode.github.io/solo) is a Jekyll theme that supports **single-page websites** only, but supports them well. Yes, it's responsive.
## Useful if...

### [Demo & Documentation →](http://chibicode.github.io/solo)
* You want to create an "about me" page from a single markdown file and host it under a custom domain name.
* You want to create a single-page website that's mostly text, like [Know Your Company](https://knowyourcompany.com/).
* You want to share a single markdown file and tried GitHub Gist ([example](https://gist.github.com/dypsilon/5819504)), but would like something nicer-looking.
* You want something like GitHub's [automatic page generator](http://pages.github.com/) for a non-code repository.

This page itself is built with Solo. It's generated from [this markdown file](https://github.com/chibicode/solo/blob/gh-pages/_includes/index.md).

## Usage

First, [install Jekyll](http://jekyllrb.com/docs/installation/). Then download Solo from its [GitHub Repository](https://github.com/chibicode/solo). Start Jekyll and you should see this page up and running.

### Files

* Edit `_config.yml` to change the site's title and description.
* Edit `_includes/head.html` to add custom code to `<head>`.
* Edit `_includes/scripts.html` to add custom code before `</body>`.
* Edit `CNAME` to host on a custom domain.
* Edit `README.md` before pushing your code.

### Don't use `<h1>` tags

Wthin `index.md`, do not use `<h1>` tags - `<h1>` is reserved for the site title.

### Supported Tags

Solo supports lists, `<hr>`s, `<table>`s,

> blockquotes, and...
~~~html
<pre>code blocks with syntax highlighting.</pre>
~~~

### License

[MIT License](http://chibicode.mit-license.org/)
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Site settings
title: Solo, a Jekyll Theme
tag_text: Solo
description: Solo is a Jekyll theme that supports single-page websites only, but supports them well. Yes, it’s responsive.
title: Jekyll One
tag_text: One
description: Jekyll One is a Jekyll theme for single-page websites only.

# Build settings
markdown: kramdown
Expand Down
11 changes: 11 additions & 0 deletions _data/content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- section: Section One
text: |
**Lorem Ipsum** is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
- section: Section Two
text: |
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
32 changes: 17 additions & 15 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="{{ site.description }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site.title }}</title>
<link rel="stylesheet" href="css/main.css">
{% include head.html %}
</head>
<body>
<div class="container">
<h1><a href="./">{{ site.tag_text }}</a></h1>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="{{ site.description }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site.title }}</title>
<link href='https://fonts.googleapis.com/css?family=Montserrat:700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Lora:400,400italic,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
{% include head.html %}
</head>
<body>
<div class="container">
<h1><a href="./">{{ site.tag_text }}</a></h1>
</div>
{{ content }}
</div>
{% include scripts.html %}
</body>
{% include scripts.html %}
</body>
</html>
8 changes: 3 additions & 5 deletions _sass/_solo.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import url(//fonts.googleapis.com/css?family=Inconsolata:400,700|Montserrat:700);

html {
font: 16px/1.5 Inconsolata, sans-serif;
font: 16px/1.5 $main-font, sans-serif;
}

@media (min-width: 30rem) {
Expand All @@ -22,7 +20,7 @@ body {
}

a {
color: #0074d9; /* From http://clrs.cc */
color: $action-colour;
text-decoration: none;
}

Expand All @@ -31,7 +29,7 @@ a:hover, a:focus {
}

h1, h2, h3, h4, h5, h6 {
font-family: Montserrat, sans-serif;
font-family: $heading-font, sans-serif;
margin: 0 0 0.5rem -0.1rem /* align left edge */;
line-height: 1;
color: #111;
Expand Down
6 changes: 6 additions & 0 deletions _sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Colours
$action-colour: rgb(122,184,0);

// Typography
$main-font: Lora;
$heading-font: Montserrat;
1 change: 1 addition & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

@import
'normalize',
'variables',
'solo',
'syntax';
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: default
---

{% for s in site.data.content %}
<section>
<div class="container">
<h2>{{ s.section }}</h2>
{{ s.text | markdownify }}
</div>
</section>
{% endfor %}
63 changes: 0 additions & 63 deletions index.md

This file was deleted.

0 comments on commit 5a99384

Please sign in to comment.