Skip to content

ayushgoel/ayushgoel.github.io

Repository files navigation

Blog made using Jekyll and Github pages. Woohoo!

Theme

The theme is a custom one built on top of Emerald.

How blog looks

Theme customizations

  1. Change colors used across the blog by changing the respective values in base.scss

    $main-color: #173D48;
    $background-color: #FDFDFD;
    $text-color: #333333;
    
  2. To change the header image

    • With commit the background is created using SVG. Create one using svgbackgrounds.
    • Previously:
      • Change the image named header-background.jpg in images folder.
      • You can also edit the CSS directly to get the image in header.scss.

Google Analytics

  1. Replace with your analytics code in google_analytics.html.
  2. Uncomment {% include google_analytics.html %} in head.html

Google Ads

You can add your relevant code to post.html

Creating a page

Add the markdown file in _pages folder.

Creating a post

Some helper scripts have been added to ease the process of creating the markdown for post with front matter already added.

  1. Add the markdown file in _posts folder.

  2. Alternatively, use publish.sh to convert a simple markdown to a post and add tags to it.

    Usage: ./publish.sh <path-to-post-file> <title-of-post> <tags>
    Note: assumes post file to be markdown
  3. Add create-post as submodule (git submodule update --init). Now you can use create-post in the repo to create new posts.

    $ ./create-post --help
    usage: create-post.py [-h] [--dir DIR] [--ext EXT] [--title TITLE] [--version]
    
    Create sample post file to be used by Jekyll
    
    optional arguments:
      -h, --help     show this help message and exit
      --dir DIR      Directory path to write the sample post in. Default: _posts/
      --ext EXT      Extension type for the post. Default: .md
      --title TITLE  Title of the post. Default: title
      --version      show program's version number and exit

Creating a post that should not be shown in blog feed

Add tag DO_NOT_SHOW_IN_POSTS to such a post. It will be skipped when showing feed. Check this post for example.

Archiving a post

As your writing skills improve, you might feel that your old posts are not well written or have become obsolete. Instead of removing them, you can archive them so that they are not shown in the index page of your site, but are still accessible to anyone who wants to have a look.

The Archive page is linked at the bottom with the page numbers of your blog.

To mark a post as archived, add tag ARCHIVE to such a post. Check this post for example.

Note: this impacts pagination since you might have less posts in a page as you intended.

Installation

Run locally

bundle exec jekyll serve will start the site on http://localhost:4000.

Author

Ayush Goel, ayushgoel111@gmail.com

License

  • The contents of this repository (except _posts, _pages, assets and _drafts folder) are available under the MIT license. See the LICENSE file for more info.
  • The contents of _posts, _pages, assets and _drafts folder are Copyright Ayush Goel. You may not reuse anything therein without my permission.