Skip to content

Commit

Permalink
Fix gatsby-node.js issue & Limit Course Reviews to Up to 4 years in T…
Browse files Browse the repository at this point in the history
…he Past
  • Loading branch information
Rohaan553 committed Jan 14, 2024
1 parent 091ca44 commit c3de277
Show file tree
Hide file tree
Showing 4 changed files with 660 additions and 73 deletions.
2 changes: 1 addition & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => {
}
// https://angelos.dev/2019/09/add-support-for-modification-times-in-gatsby/
const gitAuthorTime = execSync(
`git log -1 --pretty=format:%aI ${node.fileAbsolutePath}`
`git log -1 --pretty=format:%aI "${node.fileAbsolutePath}"`
).toString()

createNodeField({
Expand Down
2 changes: 1 addition & 1 deletion src/components/testimonial.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import ProfessorTooltip from "./professor-tooltip"

const Testimonial = ({ review, difficulty, prof, term, year, quality }) => {
return (
return new Date().getFullYear() - year <= 4 && (
<div className="border shadow-sm mb-4">
<div className="bg-gray-100 flex flex-col md:flex-row justify-between text-gray-900 px-3 py-1 border-b">
<span className="flex flex-col sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sitegraph-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const isAnchorLink = (link) => {
// link to a section in the same markdown document
// also known as anchor links or "links to heading id"
return link.charAt(0) == '#'; // start with a #
return link.charAt(0) === '#'; // start with a #
}

const isExternalLink = (link) =>
Expand Down
Loading

0 comments on commit c3de277

Please sign in to comment.