Commit 2b83a8ee authored by Afzaal Ahmad Zeeshan's avatar Afzaal Ahmad Zeeshan 😴

Changed the content a bit, and staging the changes before writing the blog post.

parent e48bd926
Pipeline #107014642 failed with stage
in 2 minutes and 17 seconds
......@@ -4,6 +4,7 @@ root = true
insert_final_newline = true
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
[*.js]
indent_size = 2
{
"MD032": false
}
......@@ -2,6 +2,7 @@
title: Hello World
date: "2019-12-17T22:23:03.000Z"
description: "No, really, hey there everyone!"
published: true
---
Staging this post, for a long post. I have hardly finished authoring the website
......
---
title: "Software Developer's New Year Resolution: 2020"
date: "2020-01-01T00:00:00.000Z"
author: "Afzaal Ahmad Zeeshan"
tags: [ "happy new year", "software developer" ]
published: false
---
I am about to be a decade old in software development, and open source communities.
I have had the honor to collaborate with some of the finest in the industry, and
write articles, and do courses with a few of the best in the market. But, there are
some things that not everyone says in the market. But, those who know me, know that
I enjoy saying what I feel any time of the day.
2019 was not an amazing year for me, and I do not hold any grudges against 2019 for
that, I was a bit lazy throughout the year, and I missed a lot of interesting opportunities
because of my laziness. I was also busy in a couple of important things; family-related.
## Learning
## Family and friends
## Community and Open Source
## Games and Entertainment
## New hobby still not found
I am still looking for a new hobby. I have tried:
1. Technical and non-technical writing.
1. Sports.
1. Travel and adventure.
1. Sleeping throughout the day.
None of the activities have so far helped me in any way.
......@@ -74,5 +74,11 @@ module.exports = {
pathToConfigModule: `src/utils/typography`,
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
sitemapSize: 5000
}
}
],
}
......@@ -19,10 +19,16 @@ exports.createPages = async ({ graphql, actions }) => {
}
frontmatter {
title
tags
}
}
}
}
tagsGroup: allMarkdownRemark(limit: 2000) {
group(field: frontmatter___tags) {
fieldValue
}
}
}
`
)
......@@ -48,6 +54,19 @@ exports.createPages = async ({ graphql, actions }) => {
},
})
})
// Extract tag data from query
const tags = result.data.tagsGroup.group
// Make tag pages
tags.forEach(tag => {
createPage({
path: `/tags/${_.kebabCase(tag.fieldValue)}/`,
component: tagTemplate,
context: {
tag: tag.fieldValue,
},
})
})
}
exports.onCreateNode = ({ node, actions, getNode }) => {
......
......@@ -7759,6 +7759,32 @@
}
}
},
"gatsby-plugin-sitemap": {
"version": "2.2.24",
"resolved": "https://registry.npmjs.org/gatsby-plugin-sitemap/-/gatsby-plugin-sitemap-2.2.24.tgz",
"integrity": "sha512-Qzf3m1EBkDPxBIzW7mRZJ4HysY7bcF0JrHezx/t0VISACNzgma4WQ9heVc6CcgL/uv7ArZ2NHTm8WJ1wo1wSQQ==",
"requires": {
"@babel/runtime": "^7.7.6",
"minimatch": "^3.0.4",
"pify": "^3.0.0",
"sitemap": "^1.13.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz",
"integrity": "sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==",
"requires": {
"regenerator-runtime": "^0.13.2"
}
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
}
}
},
"gatsby-plugin-typography": {
"version": "2.3.18",
"resolved": "https://registry.npmjs.org/gatsby-plugin-typography/-/gatsby-plugin-typography-2.3.18.tgz",
......@@ -14898,6 +14924,15 @@
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz",
"integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig=="
},
"sitemap": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/sitemap/-/sitemap-1.13.0.tgz",
"integrity": "sha1-Vpy+IYAgKSamKiZs094Jyc60P4M=",
"requires": {
"underscore": "^1.7.0",
"url-join": "^1.1.0"
}
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
......@@ -16369,6 +16404,11 @@
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
},
"underscore": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
"integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
},
"underscore.string": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz",
......@@ -16812,6 +16852,11 @@
}
}
},
"url-join": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz",
"integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg="
},
"url-loader": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz",
......
......@@ -65,10 +65,10 @@ class Layout extends React.Component {
<footer>
© {new Date().getFullYear()}, Built with
{` `}
<a href="https://www.gatsbyjs.org">Gatsby</a> and deployed on <a href="https://gitlab.com/afzaal-ahmad-zeeshan-dotcom/afzaal-ahmad-zeeshan-dotcom.gitlab.io">GitLab</a>.
<a href="https://www.gatsbyjs.org">Gatsby</a> and deployed on <a href="https://gitlab.com/afzaal-ahmad-zeeshan-dotcom/website">GitLab</a>.
{/* Global site tag (gtag.js) - Google Analytics */}
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-104546823-1"></script>
<script src="/scripts/google-analytics.js"></script>
{/* <script async src="https://www.googletagmanager.com/gtag/js?id=UA-104546823-1"></script>
<script src="/scripts/google-analytics.js"></script> */}
<link rel="stylesheet" href="/styles/site.css" />
<script data-ad-client="ca-pub-5344286604733504" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</footer>
......
/**
* Bio component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
// import { useStaticQuery, graphql } from "gatsby"
import { rhythm } from "../utils/typography"
const Tags = () => {
// const data = useStaticQuery(graphql`
// query TagsQuery {
// markdownRemark {
// id
// }
// }
// `)
return (
<div
style={{
display: `flex`,
marginBottom: rhythm(2.5),
}}
>
<p>
Tags
</p>
</div>
)
}
export default Tags
......@@ -48,7 +48,10 @@ export const pageQuery = graphql`
title
}
}
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC }
) {
edges {
node {
excerpt
......
......@@ -2,6 +2,7 @@ import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
// import Tags from "../components/tags"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm, scale } from "../utils/typography"
......@@ -45,6 +46,7 @@ class BlogPostTemplate extends React.Component {
}}
/>
<footer>
{/* <Tags /> */}
<Bio />
</footer>
</article>
......@@ -97,6 +99,7 @@ export const pageQuery = graphql`
title
date(formatString: "MMMM DD, YYYY")
description
tags
}
}
}
......
import React from "react"
import PropTypes from "prop-types"
// Components
import { Link, graphql } from "gatsby"
const Tags = ({ pageContext, data }) => {
const { tag } = pageContext
const { edges, totalCount } = data.allMarkdownRemark
const tagHeader = `${totalCount} post${
totalCount === 1 ? "" : "s"
} tagged with "${tag}"`
return (
<div>
<h1>{tagHeader}</h1>
<ul>
{edges.map(({ node }) => {
const { slug } = node.fields
const { title } = node.frontmatter
return (
<li key={slug}>
<Link to={slug}>{title}</Link>
</li>
)
})}
</ul>
{/*
This links to a page that does not yet exist.
You'll come back to it!
*/}
<Link to="/tags">All tags</Link>
</div>
)
}
Tags.propTypes = {
pageContext: PropTypes.shape({
tag: PropTypes.string.isRequired,
}),
data: PropTypes.shape({
allMarkdownRemark: PropTypes.shape({
totalCount: PropTypes.number.isRequired,
edges: PropTypes.arrayOf(
PropTypes.shape({
node: PropTypes.shape({
frontmatter: PropTypes.shape({
title: PropTypes.string.isRequired,
}),
fields: PropTypes.shape({
slug: PropTypes.string.isRequired,
}),
}),
}).isRequired
),
}),
}),
}
export default Tags
export const pageQuery = graphql`
query($tag: String) {
allMarkdownRemark(
limit: 2000
sort: { fields: [frontmatter___date], order: DESC }
filter: { frontmatter: { tags: { in: [$tag] } } }
) {
totalCount
edges {
node {
fields {
slug
}
frontmatter {
title
}
}
}
}
}
`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment