GithubHelp home page GithubHelp logo

ryanwiemer / gatsby-theme-amsterdam Goto Github PK

View Code? Open in Web Editor NEW
137.0 1.0 34.0 4.46 MB

A Gatsby theme for artists, photographers and other creative folks ๐Ÿ‘จโ€๐ŸŽจ

Home Page: https://amsterdam.netlify.app/

License: MIT License

JavaScript 100.00%
gatsby gatsby-theme static-site theme theme-development

gatsby-theme-amsterdam's Introduction

Gatsby Theme Amsterdam

Gatsby Theme Amsterdam is released under the MIT license. Current npm package version. Downloads per month on npm. Total downloads on npm. PRs welcome! Follow @ryanwiemer

A Gatsby theme for artists, photographers and other creative folks.

Demo Website

Features

  • Minimal responsive design
  • Optional page transitions
  • Multiple grid options to display posts
  • Customizable theme colors and typography with Theme UI
  • MDX support
  • SEO friendly component
  • Mobile menu
  • Optional scroll progress indicator
  • Optional toggle to switch color modes
  • Emotion using styled-components syntax
  • Tags
  • Pagination
  • Offline support

Installation

This will generate a new site pre-configured to use Gatsby Theme Amsterdam.

gatsby new your-themed-site https://github.com/ryanwiemer/gatsby-starter-amsterdam

Manually Add To Your Site

  1. Install the theme
npm install --save gatsby-theme-amsterdam

or

yarn add gatsby-theme-amsterdam
  1. Add the theme to your gatsby-config.js
// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-theme-amsterdam',
      options: {
        // See theme options section for more information
      },
    },
  ],
}

Usage

Theme Options

Key Default Value Description
basePath / Root URL for all posts.
contentPath content Location of markdown files used for the posts.
transitions true Include simple page transitions powered with framer-motion
postsPerPage 6 Determines the number of posts shown on each page. This effects both the posts and tag template.
grid basic Determines the type of grid used on the posts and tag templates. Two available options: basic and list.
progressIndicator true Include a progress indicator on the post template.
colorToggle true Include a button in the menu to toggle the color modes.

Example Usage

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-theme-amsterdam',
      options: {
        // basePath defaults to '/'
        basePath: 'photography',
        // grid defaults to 'basic'
        grid: 'list',
      },
    },
  ],
}

Additional Configuration

In addition to the theme options, there are a handful of items you can customize via the siteMetadata object in your site's gatsby-config.js.

// gatsby-config.js
module.exports = {
  siteMetadata: {
    // Used for the site title and SEO
    title: 'My Site Title',
    // Used for SEO
    description: 'My site description...',
    // Used for SEO. Do not include a trailing slash
    url: 'https://www.example.com',
    // Used for SEO. Must be the full URL for the default image
    image: 'https://www.example.com/og-image.jpg',
    // Used for SEO
    author: 'John Doe',
    // Used for an optional intro section at the top of the posts template
    intro: 'John Doe is a photographer....',
    // Used for the links in the menu
    menuLinks: [
      {
        name: 'Home',
        slug: '/',
      },
      {
        name: 'About',
        slug: '/about/',
      },
      {
        name: 'Contact',
        slug: '/contact/',
      },
    ],
    // Used for the links in the footer
    footerLinks: [
      {
        name: 'Dribbble',
        url: 'https://www.dribbble.com/johndoe',
      },
      {
        name: 'Instagram',
        url: 'https://www.instagram.com/johndoe',
      },
    ],
  },
}

Customization

Gatsby Theme Amsterdam utilizes Theme UI. In order to customize the theme styling you must create a theme file and then override the default amsterdamTheme values. If you're familiar with Styled Components or Emotion it's the same as adapting the theme you pass to ThemeProvider.

All default values can be viewed here.

// src/gatsby-plugin-theme-ui/index.js

import amsterdamTheme from 'gatsby-theme-amsterdam/src/gatsby-plugin-theme-ui'

export default {
  ...amsterdamTheme,
  colors: {
    ...amsterdamTheme.colors,
    background: '#FCD5C0',
  },
}

Writing Content

Posts are written in markdown / mdx format with either .md or .mdx and placed in the content directory at the root of the site unless a different contentPath is defined in the theme options. There are four front matter variables used in the theme which are shown below.

---
title: Hello World
date: 2019-07-06
cover: cover.jpg
tags: [greeting, blog]
---

gatsby-theme-amsterdam's People

Contributors

ryanwiemer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gatsby-theme-amsterdam's Issues

external cover img

I have an external cdn server hosting my media, when I add the img url instead of local img name it doesn't get it

[Bug/build] Conflicting versions of eslint breaks build

Hi,

I encountered a strange issue when trying to build a new version of my personal site built with this theme on Gitlab where I merged a commit that only changed the markdown content of one page.

In essence, it seems if I'm understanding correctly there's a conflict between versions of eslint that the theme uses and the eslint that gatsby uses?

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.3.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.23.0" from [email protected]
npm ERR! node_modules/eslint-config-gatsby-standard
npm ERR!   dev eslint-config-gatsby-standard@"^3.0.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 

Not sure if I'm understanding this correctly.

Since then I've tried.

  • upgrading all packages
  • uninstalling gatsby + all dependencies completely, re-installinng the project
  • uninstalling gatsby + all dependencies completely, creating a new project with the theme
  • creating a new gatsby project, manually adding the theme.

All roads seem to lead to this error, and I'm not sure what I'm doing wrong here - any advice would be very much appreciated.

Request to add feed

Hello, ryanwiemer! I tried for a long time without success. I tried for a long time without success and had to turn to you! Looking forward to your response!

[Feature] Option to disable hero image per post

First of all, what an awesome theme!! IMO technically the most robust of all theme-jam entries and thus migrating to Amsterdam right now. As for the request:

  • some of my post pages are not suited for a hero/cover
  • it would be nice if I could disable hero/cover-rendering per post
  • perhaps as a front matter option?

If you are open to this suggestion I could try to PR a change.

How to change the URL for the post list?

The post list is displayed under the URL '/'. If I change the start_url in the gatsby-config.js file to start_url: /posts/, it has no effect.

What would the correct procedure be if I want the list of posts under the URL '/posts/' and I want to display a separate page when starting the app?

Remark: I generate a new site as described under installation.

Thank you.

Scrollbar in nav on Windows

There's a scrollbar on the nav which looks a bit funky. Visible on any windows browser. This is due to overflow-y: scroll,

image

Appears on both the variants of the header

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.