Giter Club home page Giter Club logo

gatsby-theme-gallery's Introduction

gatsby-theme-gallery ๐Ÿž

A Gatsby Theme for adding a gallery to your site.

GitHub npm Netlify Status

Why?

You want a place to share your photos and you want to host it yourself, no third-party services. You also want the solution to be really simple and extendable.

That's where gatsby-theme-gallery comes into play. Just drop your images into a directory (content/gallery) and we'll generate a gallery based on that.

What's in the box?

  • ๐Ÿ’ฏ Easy to set up gallery.
  • ๐Ÿ”‹ Gallery component.
  • ๐Ÿ” Lightbox functionality.
  • ๐Ÿ“ฑ Responsive, mobile friendly.
  • ๐ŸŽจ Fully customizable & extendable with theme-ui.

DEMO

Installation

$ npm install --save gatsby-theme-gallery

Usage

// gatsby-config.js
module.exports = {
  plugins: ["gatsby-theme-gallery"],
};

That's it! Drop images into your content/gallery directory and we'll serve up the gallery on basePath.

Theme options

Key Default Required Description
basePath / false URL for gallery page
galleryPath content/gallery false Location of gallery images

<Gallery />

Don't like the gallery page layout?

No problem! Just use the Gallery component.

import { Gallery } from "gatsby-theme-gallery";

const MyGallery = () => (
  <AwesomeLayout>
    <Gallery />
  </AwesomeLayout>
);

Shadowing

Gatsby Themes has a concept called Shadowing, which allows users to override a file in a gatsby theme. This allows the theme to be fully customizable.

To start shadowing, create a folder with the theme name gatsby-theme-gallery in your project's src directory.

Now you're able to override any file in the theme. For example, if you want to override the Footer component, create a file:

src/gatsby-theme-gallery/components/Footer.js

Here's a demo of that demo/src/gatsby-theme-gallery/components/Footer.js

Available Scripts

$ yarn dev

This will run the demo app in development mode.

Navigate to http://localhost:8000 to view it in the browser.

$ yarn build

This will build the demo app for production.

Outputs to the demo/public folder.

gatsby-theme-gallery's People

Contributors

epilande avatar josephsurin avatar dependabot[bot] avatar

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.