Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavs committed Oct 29, 2020
0 parents commit b9ba877
Show file tree
Hide file tree
Showing 36 changed files with 929 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.gem
.bundle
.jekyll-cache
.sass-cache
_site
Gemfile.lock
25 changes: 25 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: post
---

<style type="text/css" media="screen">
.container {
margin: 1em auto;
max-width: 60em;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 Abhinav Saxena

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
139 changes: 139 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# moonwalk

<img src="https://raw.githubusercontent.com/abhinavs/moonwalk/master/logo.png" width="64" align="left" />A fast and minimalistic blog with clean dark mode. Based on [no style please](https://riggraz.dev/no-style-please/)

<h3 align="center"><a href="https://abhinavs.github.io/moonwalk/">Try the demo out!</a></h3>

<img src="https://raw.githubusercontent.com/abhinavs/moonwalk/master/_screenshots/moonwalk.png" />

## Features
* Light & dark mode with theme switcher
* Vertical list, horizontal list, card list
* Landing page with navbar, footer, portfolio
* Fast (very minimal CSS) - for more information on performance see [Lighthouse report](https://raw.githubusercontent.com/abhinavs/moonwalk/master/_screenshots/lighthouse-report.png)
* Responsive and mobile friendly
* SEO optimized (uses [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag))
* RSS feed (uses [Jekyll Feed](https://github.com/jekyll/jekyll-feed))
* Easy to extend
* Fully compatible with [GitHub Pages](https://pages.github.com/) (see [GitHub Pages installation](#github-pages-installation))

## Installation

If you haven't already created your blog using Jekyll, follow the [instructions](https://jekyllrb.com/docs/) to do so from Jekyll's documentation.

NOTE: if you are using Jekyll with GitHub Pages, see the [GitHub Pages installation section](#github-pages-installation).

Then, to style your blog with this theme, add this line to your Jekyll site's `Gemfile`:

```ruby
gem "moonwalk"
```

And add this line to your Jekyll site's `_config.yml`:

```yaml
theme: moonwalk
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install moonwalk
### GitHub Pages installation
If you want to use this theme for your Jekyll's site deployed on [GitHub Pages](https://pages.github.com/), follow the instructions on [this page](https://docs.github.com/en/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll#adding-a-theme).
## Usage
You can edit `_config.yml` file to customize your blog. You can change things such as the name of the blog, the author, the appearance of the theme (light, dark or auto), how dates are formatted, etc. Customizable fields should be straightforward to understand. Still, `_config.yml` contains some comments to help you understand what each field does.

For further customization (e.g. layout, CSS) see the [official Jekyll's documentation](https://jekyllrb.com/docs/themes/#overriding-theme-defaults) on customizing gem-based themes.

### Customize the menu

In order to add/edit/delete entries in the home page, you have to edit the `home.yml` file inside `_data` folder. Through that file you can define the structure of the menu. Take a look at the default configuration to get an idea of how it works and read on for a more comprehensive explanation.

Data can be configured in `_data/home.yml` file - you can add data for navbar, footer, portfolio or simply remove all of that and use simple blog layout.

The `home.yml` file accepts the following fields:

1. Vertical list
- `entries` define a new unordered list that will contain menu entries
- each entry is marked by a `-` at the beginning of the line
- each entry has the following attributes:
- `title`, which defines the text to render for that menu entry
- `url`, which can either be a URL or `false`. If it is `false`, the entry will be rendered as plain text; otherwise the entry will be rendered as a link pointing to the specified URL. Note that the URL can either be relative or absolute.
- `post_list`, which can be `true` or `false`. If it is true, the entry will have all posts in the site as subentries. This is used to render your post list.
- `entries`, yes, you can have entries inside entries. In this way you can create nested sublists!
2. Card list - cards are used to showcase portfolio projects. Please see `project_entries` in `_data/home.yml` file
- each entry is marked by a `-` at the beginning of the line
- each entry has the following attributes:
- `title` defines the header of the card
- `desc` is the body of the card
- `url` is a relative or absolute link which this card can point to.
- `highlight` in case you want to highlight something, keep the text short though
3. Horizontal list - moonwalk uses horizontal lists to create navbar and footer. Please see `navbar_entries` and `footer_entries` in `data/home.yml` file
- each entry is marked by a `-` at the beginning of the line
- each entry has the following attributes:
- `title` defines the header of the card
- `url` is a relative or absolute link which this card can point to.


### Pro tips
1. Moonwalk has 3 in-built layouts:
- post - for content
- blog - for listing blog posts
- home - for landing page
you can change your `index.md` file to use either home or blog layout.

2. It is extremely easy to tweak the color scheme.
- for light mode, customize these css variables
```css
html {
--bg: #fff;
--bg-secondary: #f8f9fa;
--headings: #000;
--text: #333;
--links: blue;
--highlight: #ffecb2; // light yellow
}
```
- for dark mode customize these css variables
```css
@mixin dark-appearance {
html, body {
--bg: #1f242A;
--bg-secondary: #323945;
--headings: #3D9970;
--text: #adb5bd;
--links: #91a7ff;
--highlight: #ffd8a8;
--highlight: #ffd43b;
};
}
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/abhinavs/moonwalk.

## Development

To set up your environment to develop this theme, run `bundle install`.

Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
To add a custom directory to your theme-gem, please edit the regexp in `moonwalk.gemspec` accordingly.

## Acknowledgement
This theme's original base is [no style please](https://github.com/riggraz/no-style-please) theme created by [Riccardo Graziosi](https://riggraz.dev/) - many thanks to him for creating a theme with nearly no css.

## License

The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

32 changes: 32 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: Moonwalk
author: Abhinav Saxena
url: https://www.abhinav.co # root address of the site
description: > # description of the site (multiple lines allowed)
Moonwalk is a fast and elegant Jekyll theme with a clean dark mode. It comes with horizontal list (for navbar and footer), card list (for portfolio), and a generic vertical list. It is very easy to modify in case you want to build over it - please see _layouts/home.html to do that.
permalink: /:slug.html

favicon: "./logo.png" # relative path to site's favicon
# goat_counter: "yoursitename" # put your GoatCounter name if you want to use GoatCounter analytics

#theme: moonwalk # if you are using GitHub Pages, change it to remote_theme: abhinavs/moonwalk
remote_theme: abhinavs/moonwalk

theme_config:
appearance: "dark" # can be "light", "dark" or "auto"
back_home_text: "home.." # customize text for homepage link in post layout
date_format: "%Y-%m-%d" # customize how date is formatted
show_description: true # show blog description in home page
show_navbar: true # show horizontal navbar in home page
show_footer: true # show footer links in home page,add in _data/home.yml
show_projects: true # show projects as cards, add in _data/home.yml
show_old_projects: true # show old projects as cards, add in _data/home.yml
show_misc_list: true # show generic vertical list for misc details, add _data/home.yml


sass:
style: :compressed

plugins:
- jekyll-feed
- jekyll-seo-tag
109 changes: 109 additions & 0 deletions _data/home.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
navbar_entries:
- title: about
url: about

- title: blog
url: blog

- title: website
url: http://www.abhinav.co

project_entries:
- title: Project 1
url: overview-post
desc: This is an example project, configured in _data/home.yml

- title: Project 2
url: overview-post
desc: Projects are shown in card layout

- title: Project 3
url: overview-post
desc: You can control visibility from _config.yml file

- title: Project 4
url: overview-post
desc: This project uses highlight markup, configured in _data/home.yml
highlight: WIP

- title: Project 5
url: overview-post
desc: Moonwalk also has horizontal list (used in header and footer)
highlight: WIP

- title: Project 6
url: overview-post
desc: It also has a scalable vertical list (in case you need it)

old_project_entries:
- title: microrequests
url: http://www.abhinav.co/microrequests
desc: A Python library to consume microservices more efficiently

- title: blockr
url: http://www.abhinav.co/blockr
desc: A CLI tool to help you easily block and unblock websites

- title: moonwalk
url: https://github.com/abhinavs/moonwalk
desc: A fast and minimalist Jekyll blog theme with clean dark mode

- title: humangous
url: http://www.humangous.co
desc: The better people know you, the better they collaborate

- title: avnee
url: http://www.avnee.co
desc: New age kids require new ways of parenting

- title: year progress
url: https://year-progress.herokuapp.com/
desc: A bot written for slack that shows current year in a progress bar
highlight: archived

footer_entries:
- title: abhinav's homepage
url: http://www.abhinav.co

- title: twitter
url: https://twitter.com/abhinav

- title: github
url: https://github.com/abhinavs

- title: feed
url: feed.xml

misc_entries:
- title: this is an example vertical list
url: false

- title: you can show or hide using a boolean flag in _config.yml
url: false

- title: and you can add data in _data/home.yml
url: false

- title: Blog posts
post_list: true
url: false

- title: moonwalk on the Internet
url: false
entries:
- title: on Github
url: https://github.com/abhinavs/moonwalk

- title: originally built for abhinav's homepage
url: http://www.abhinav.co

- title: this list is scalable and can be nested
url: false
entries:
- title: this is nested inside a nested list
url: false

- title: it is easy to use, see _data/home.yml to see how to configure it.
url: false


26 changes: 26 additions & 0 deletions _includes/card_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<ul class="horizontal-list">
{% for item in include.collection %}

<li class="card">
<a href="{{ item.url }}">
<span class="header">
{{ item.title }}

{% if item.highlight %}
<mark>{{ item.highlight }}</mark>
{% endif %}

</span>

<hr />

{% if item.desc != false %}
<p class="body">
{{ item.desc }}
</p>
{% endif %}
</a>
</li>

{% endfor %}
</ul>
6 changes: 6 additions & 0 deletions _includes/goat_counter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script data-goatcounter="https://{{ site.goat_counter }}.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>

<noscript>
<img src="https://{{ site.goat_counter }}.goatcounter.com/count?p=/test-img">
</noscript>
20 changes: 20 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>
{% if page.title %}
{{ page.title }}
{% else %}
{{ site.title }}
{% endif %}
</title>

{% seo title=false %}
{% feed_meta %}

<link rel="shortcut icon" type="image/x-icon" href="/{{ site.favicon }}" />
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.css" />
{% include toggle_theme_js.html %}
</head>
Loading

0 comments on commit b9ba877

Please sign in to comment.