Skip to content
A submission for the Gatsby Theme Jam.
JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead of jlengstorf:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
theme
.gitignore
README.md
netlify.toml
package.json
yarn.lock

README.md

Gatsby Theme Hacker News

  • an elegant way to display linked headlines from Hacker News
  • option to display on styled MDX file

This theme includes

Here's the source code

Check out a live demo

Example:

example

Installation

To use this theme in your Gatsby sites, follow these instructions:

  1. Install the theme
npm install --save gatsby-theme-hacker-news
  1. Add the theme to your gatsby-config.js:
module.exports = {
  plugins: ["gatsby-theme-hacker-news"],
}
  1. Start your site
gatsby develop

To change the number of displayed headlines:

  • create a shadow component List.js
  • in the shadow component, splice the map function. For example, to display 11 results:
{data.allHnStory.edges.splice(0,11).map(({ node })
  • alternately, modify the GraphQL query:
allHnStory(sort: {fields: [order]}, limit: 11)
You can’t perform that action at this time.