Giter Site home page Giter Site logo

sana137.in's Introduction

First things first

For updating the website (assuming you have the repo locally):

yarn depoly
  1. Go to GitHub repo Settings.
  2. Look for "GitHub Pages" from bottom.
  3. Update "Custom domain" accordingly.

Usage note

Getting the repo

# Run the following commands
git clone https://github.com/cognitive137/sana137.in
cd path/to/cloned/repo
yarn # to install dependencies

Adding new blogs

  1. Create a folder in blogs, say newBlogPost.
  2. In the folder newBlogPost, create a markdown file index.md.
  3. Put the content of the blog in the index.md file.

Adding background to tags

Adding cover to tags is handled via an array of objects. That array is located at ./src/tagData/index.js.

That file contains an array tagData. Each element of tagData, must be an object, with two keys, tag and cover.

Each object should match:

{
  tag: 'unique tag here',
  cover: 'www.example.com/path/to/cover'
}

Make sure you don't repeat tags in array in ./src/tagData/index.js, else none will be chosen.

Frontmatter

In every blog post, it is necessary to start the blog post with the following content:

---
cover: 'www.example.com/path/to/cover/img'
date: 'yyyy-mm-dd'
excerpt: 'Add excerpt here'
page: 'true/false'
path: '/uri-to-blog-post'
tags: ['some', 'tags', 'in', 'lowercase']
title: 'Blog Post’s Title'

---

Note

  1. All except the excerpt are necessary fields. Make sure you would not be able to escape the single or double quotes in excerpt, so make use of enclosing alternatives.

  2. In case if you do not wish to have any tags, keep that parameter to [''].

  3. Use the yyyy-mm-dd date format.

  4. Make sure path starts with /, and is unique.

Testing your addition renders perfectly

Run the following commands to test if the site works fine locally.

yarn clean
yarn start
# Look in the terminal on which port the site is live.
# navigate to localhost:port/path-to-new-blog

Updating the website

Run the following commands to update the website:

yarn clean
yarn build
yarn deploy

Run the following commands to push the local changes to remote:

git add .
git commit -m "Added new blog (or) made some changes"
git push

Note about styling

Only the Footer functional component (src/components/footer.js) imports layout.css.

sana137.in's People

Contributors

acagastya avatar cognitive137 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

acagastya

sana137.in's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.