commit 153166106d833a62e6be2302d33c9deb96d36299
parent 76a8a558260999d7e7c1dbaacb05899ed424fc82
Author: Agastya Chandrakant <acagastya@outlook.com>
Date: Wed, 24 Jun 2020 22:40:50 +0530
add scripts, tag img, update readme, rmv twtr, tag to topic and move blogs
Diffstat:
10 files changed, 85 insertions(+), 38 deletions(-)
diff --git a/README.md b/README.md
@@ -1,18 +1,29 @@
## First things first
-For updating the website:
+For updating the website (assuming you have the repo locally):
```zsh
yarn depoly
```
-1. Go to [Settings](https://github.com/cognitive137/sana137.in/settings).
+1. Go to GitHub repo [Settings](https://github.com/cognitive137/sana137.in/settings).
2. Look for "GitHub Pages" from bottom.
3. Update "Custom domain" accordingly.
+# Usage note
+
+## Getting the repo
+
+```bash
+# 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 `src/blogs`, say _`newBlogPost`_.
+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.
@@ -31,7 +42,7 @@ Each object should match:
}
```
-Make sure you don't repeat tags, else none will be chosen.
+Make sure you don't repeat tags in array in `./src/tagData/index.js`, else none will be chosen.
## Frontmatter
@@ -60,13 +71,31 @@ title: 'Blog Post’s Title'
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.
+
+```bash
+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:
```bash
-gatsby build
-cd public
+yarn clean
+yarn build
+yarn deploy
+```
+Run the following commands to push the local changes to remote:
+
+```bash
+git add .
+git commit -m "Added new blog (or) made some changes"
git push
```
diff --git a/blogs/zealots-against-zomato/index.md b/blogs/zealots-against-zomato/index.md
@@ -0,0 +1,20 @@
+---
+path: '/zealots-against-zomato'
+date: '2019-08-08'
+title: 'Zealots against Zomato'
+tags: ['religion', 'food', 'discrimination', 'zomato', 'faith']
+cover: 'https://images.unsplash.com/photo-1526367790999-0150786686a2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80'
+excerpt: "I can't justify someone's request to not have a particular person as the SPL because she is of a particular religion. Judging here on the..."
+---
+
+I can't justify someone's request to not have a particular person as the SPL because she is of a particular religion. Judging here on the basis of the faith they hold is not the right criterion because that will have no effect on what services you expect from them. Just like letting someone not be a doctor because they are fat, or not hiring a driver who wakes up in the middle of the night, strap up for a while and goes back to sleep.
+
+Ordering food home and having a problem with the delivery boy because of his faith makes no sense, just like not wanting to go to an office where there is no picture of God put up.
+
+But if I have to guess why he might have done that, maybe ignorance, he probably thought that the driver would chant a prayer for him and package to be delivered safely and that way his food is getting effected in a way that he did not expect.
+
+Or maybe he dislikes the practices that a general Muslim would do and thus, was not ready to accept services from them, but maybe ignore or not make an effort to know if the other services that he had been getting are from a Muslim.
+
+But none of the guesses that I made are valid enough for him to put up a request like that.
+
+---
diff --git a/gatsby-config.js b/gatsby-config.js
@@ -1,12 +1,12 @@
module.exports = {
siteMetadata: {
author: `Sana`,
- description: `Welcome to my website!`,
- headerImg: `https://images.unsplash.com/photo-1536633125620-8a3245c11ffa`,
+ description: `Hi, I am Sana!`,
+ headerImg: `https://images.unsplash.com/photo-1536633125620-8a3245c11ffa?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2822&q=80`,
name: `Sana`,
- photo: `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQMmVLtfjxqwhKZ7MR9I8SIn9s3LsN7l9z7vuIfjzYt97fN3B7&s`,
+ photo: `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQMmVLtfjxqwhKZ7MR9I8SIn9s3LsN7l9z7vuIfjzYt97fN3B7&`,
siteUrl: `https://sana137.in`,
- title: `Sana's stories`,
+ title: `Welcome to my website!`,
homeName: `サナ`,
},
plugins: [
@@ -40,7 +40,7 @@ module.exports = {
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
- path: `${__dirname}/src/blogs`,
+ path: `${__dirname}/blogs`,
},
},
`gatsby-plugin-react-helmet`,
diff --git a/gatsby-node.js b/gatsby-node.js
@@ -61,7 +61,7 @@ exports.createPages = ({ graphql, actions }) => {
}
}
allMarkdownRemark(
- sort: { order: ASC, fields: [frontmatter___date] }
+ sort: { order: DESC, fields: [frontmatter___date] }
) {
edges {
node {
diff --git a/package.json b/package.json
@@ -1,5 +1,9 @@
{
- "author": "Agastya <me@hanabi.in>",
+ "author": {
+ "email": "me@hanabi.in",
+ "name": "Agastya",
+ "url": "https://hanabi.in"
+ },
"bugs": {
"url": "https://github.com/cognitive137/sana137.in/issues"
},
@@ -42,6 +46,7 @@
},
"scripts": {
"build": "gatsby build",
+ "clean": "rm -rf .cache public",
"dev": "gatsby develop",
"develop": "gatsby develop",
"deploy": "gatsby build && gh-pages -d public",
@@ -51,4 +56,4 @@
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing \""
},
"version": "0.1.0"
-}
+}
+\ No newline at end of file
diff --git a/src/blogs/zealots-against-zomato/index.md b/src/blogs/zealots-against-zomato/index.md
@@ -1,20 +0,0 @@
----
-path: '/zealots-against-zomato'
-date: '2019-08-08'
-title: 'Zealots against Zomato'
-tags: ['religion', 'food', 'discrimination', 'zomato', 'faith']
-cover: 'https://images.unsplash.com/photo-1526367790999-0150786686a2'
-excerpt: "I can't justify someone's request to not have a particular person as the SPL because she is of a particular religion. Judging here on the..."
----
-
-I can't justify someone's request to not have a particular person as the SPL because she is of a particular religion. Judging here on the basis of the faith they hold is not the right criterion because that will have no effect on what services you expect from them. Just like letting someone not be a doctor because they are fat, or not hiring a driver who wakes up in the middle of the night, strap up for a while and goes back to sleep.
-
-Ordering food home and having a problem with the delivery boy because of his faith makes no sense, just like not wanting to go to an office where there is no picture of God put up.
-
-But if I have to guess why he might have done that, maybe ignorance, he probably thought that the driver would chant a prayer for him and package to be delivered safely and that way his food is getting effected in a way that he did not expect.
-
-Or maybe he dislikes the practices that a general Muslim would do and thus, was not ready to accept services from them, but maybe ignore or not make an effort to know if the other services that he had been getting are from a Muslim.
-
-But none of the guesses that I made are valid enough for him to put up a request like that.
-
----
diff --git a/src/components/complexHeader.js b/src/components/complexHeader.js
@@ -59,7 +59,7 @@ const TinyHeader = ({ homeName, siteUrl }) => {
<ul className="nav" role="menu">
<li className="nav-weblog" role="menuitem">
<Link to={'/tags'} style={{ textTransform: `upper` }}>
- #tags
+ Topics
</Link>
</li>
</ul>
diff --git a/src/components/tinyHeader.js b/src/components/tinyHeader.js
@@ -24,7 +24,7 @@ const TinyHeader = () => {
<ul className="nav" role="menu">
<li className="nav-weblog" role="menuitem">
<Link to={'/tags'} style={{ textTransform: `upper` }}>
- #tags
+ Topics
</Link>
</li>
</ul>
diff --git a/src/tagData/index.js b/src/tagData/index.js
@@ -1,7 +1,19 @@
tagData = [
{
+ tag: 'discrimination',
+ cover: 'https://images.unsplash.com/photo-1590719550920-7543bd5657a3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
+ },
+ {
+ tag: 'faith',
+ cover: 'https://images.unsplash.com/photo-1575751639353-e292e76daca3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80',
+ },
+ {
tag: 'food',
- cover: '',
+ cover: 'https://images.unsplash.com/photo-1496412705862-e0088f16f791?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80',
},
+ {
+ tag: 'religion',
+ cover: 'https://images.unsplash.com/photo-1501043658504-36d366f4b08a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
+ }
];
module.exports = tagData;
diff --git a/src/templates/allTagsIndex.js b/src/templates/allTagsIndex.js
@@ -13,7 +13,7 @@ const AllTagsTemplate = ({ data, pageContext }) => {
<div className={'inner'}>
<article className={'post-full post page no-image'}>
<header className={'post-full-header'}>
- <h1 className={'post-full-title'}>#Tags</h1>
+ <h1 className={'post-full-title'}>Topics</h1>
</header>
<section className={'post-full-content'}>
<div className={'post-content'}>