All Projects → hackclub → theme-starter

hackclub / theme-starter

Licence: other
🐤 A sample Next.js project for getting started with MDX, Theme UI, & Hack Club Theme.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to theme-starter

gatsby-themes
A collection of open source, well designed, highly customizable and 100% free Gatsby themes for blazing fast sites. We are working on the next version of the Flex theme. See https://github.com/reflexjs/reflexjs
Stars: ✭ 296 (+316.9%)
Mutual labels:  mdx, theme-ui
nextjs-complete-boilerplate
Next js 12.3.1 boilerplate with Styled Components, Jest, React Testing Library, Prettier, ESLint, Plop JS and more 🚀
Stars: ✭ 50 (-29.58%)
Mutual labels:  mdx, nextjs-starter
skin-ui
A Theme UI Live Preview and Code Editor 🎟️
Stars: ✭ 73 (+2.82%)
Mutual labels:  mdx, theme-ui
gatsby-starter-specimens
Leverage the wide variety of powerful React components to build your design system. Display colors, typography or any other design tokens with ease. Works seamlessly with MDX.
Stars: ✭ 35 (-50.7%)
Mutual labels:  mdx, theme-ui
Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+14670.42%)
Mutual labels:  mdx, theme-ui
TwoDark
Atom's OneDark inspired theme for Sublime Text
Stars: ✭ 19 (-73.24%)
Mutual labels:  theme-ui
sreetamdas.com
Personal website built with Next.js, TypeScript and Styled-components
Stars: ✭ 175 (+146.48%)
Mutual labels:  mdx
next-prankz
A project showing how to fake a news website to rick roll people.
Stars: ✭ 57 (-19.72%)
Mutual labels:  nextjs-starter
Gatsby Starter Portfolio Emma
Minimalistic portfolio with full-width grid, page transitions, support for additional MDX pages, and a focus on large images. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.
Stars: ✭ 253 (+256.34%)
Mutual labels:  mdx
samuelkraft-next
My personal website written with Next.js, Typescript, MDX, Tailwind
Stars: ✭ 250 (+252.11%)
Mutual labels:  mdx
usehooks-ts
React hook library, ready to use, written in Typescript.
Stars: ✭ 2,873 (+3946.48%)
Mutual labels:  mdx
nextjs-ts-antd-redux-storybook-starter
🏃🏼 Next.js + TypeScript + Ant Design + Redux Toolkit + Redux Saga + Styled Components + Jest + Storybook 企业级项目脚手架模板
Stars: ✭ 78 (+9.86%)
Mutual labels:  nextjs-starter
nextjs-firebase-fns-demo
Demo for serverless NextJS on Firebase Functions
Stars: ✭ 14 (-80.28%)
Mutual labels:  nextjs-starter
next-shopify-starter
Nextjs + Tailwind CSS + Shopify Starter
Stars: ✭ 385 (+442.25%)
Mutual labels:  nextjs-starter
nextjs-semantic
Next.js + Fomantic-UI + Styled Components
Stars: ✭ 68 (-4.23%)
Mutual labels:  nextjs-starter
gatsby-minimal-portfolio
👔 JAMstack (Gatsby JS) content-focused portfolio blog starter. Features include dark-mode, installable PWA, SEO, code highlighting, form, CI/CD.
Stars: ✭ 36 (-49.3%)
Mutual labels:  theme-ui
wikit
Wikit - A universal lookup tool
Stars: ✭ 149 (+109.86%)
Mutual labels:  mdx
documentation
Documentation for dahliaOS
Stars: ✭ 78 (+9.86%)
Mutual labels:  mdx
next-saas-starter
⚡️ Free Next.js responsive landing page template for SaaS products made using JAMStack architecture.
Stars: ✭ 497 (+600%)
Mutual labels:  nextjs-starter
website
My personal website.
Stars: ✭ 29 (-59.15%)
Mutual labels:  mdx

Hack Club Theme Starter

A sample Next.js project for getting started with MDX, Theme UI, & Hack Club Theme.

Deploy with Vercel

Usage

  1. Import this repo to your coding environment of choice. Download it, git clone, or use the GitHub import on Glitch/Repl.it.
  2. yarn to install dependencies.
  3. yarn dev to start your server.
  4. Start adding your own pages & components in their respective directories.

Configuration

Theme switcher

We’ve included an example theme switcher component at components/color-switcher.js, which is included on every page through its inclusion in pages/_app.js. Feel free to change it.

Hack Club fonts

If you’re making a Hack Club HQ project, you’re allowed to use Hack Club’s font, Phantom Sans. To load it, simply uncomment the import '@hackclub/theme/fonts/reg-bold.css' line in _app.js.

Custom theme

By default, the raw Hack Club Theme will be used. If you’d like to edit the theme, we recommend making a theme file (perhaps at lib/theme.js) along these lines:

import base from '@hackclub/theme'

const theme = base

// theme.fontSizes = […]
// theme.fonts.heading = ''

export default theme

Running at another port

Super easy: yarn dev -p 5000

Adding meta tags

These template includes @hackclub/meta for adding meta tags to Hack Club HQ sites. To set default meta tags across all pages, add the following to pages/_app.js:

// import Head from 'next/head'
// import Meta from '@hackclub/meta'

<Meta
  as={Head}
  name="Hack Club" // site name
  title="Hackathons" // page title
  description="List of upcoming high school hackathons" // page description
  image="https://hackathons.hackclub.com/card.png" // large summary card image URL
  color="#ec3750" // theme color
  manifest="/site.webmanifest" // link to site manifest
/>

If you’re not making a site for HQ, don’t use @hackclub/meta, since it adds Hack Club’s favicons & info. Instead, we recommend making your own component, perhaps at components/meta.js.

Example code
import Head from 'next/head'
import theme from '@hackclub/theme' // or '../lib/theme'

export default ({
  name = 'Your Company',
  title = 'Your Project',
  description = '',
  image = 'https://yourproject.vercel.app/card.png',
  url = 'https://yourproject.vercel.app/'
}) => (
  <Head>
    <title>{title}</title>
    <meta property="og:title" content={title} />
    <meta name="twitter:title" content={title} />
    <meta name="og:url" content={url} />
    <meta property="og:type" content="website" />
    <meta property="og:site_name" content={name} />
    <meta name="description" content={description} />
    <meta property="og:description" content={description} />
    <meta name="twitter:description" content={description} />
    <meta property="og:image" content={image} />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:image" content={image} />
    <meta name="msapplication-TileColor" content={theme.colors.primary} />
    <meta name="theme-color" content={theme.colors.primary} />
  </Head>
)

Adding analytics

Hack Club HQ uses (& loves) Fathom Analytics for simple, privacy-focused analytics. (Check out our site’s analytics here.)

To add Fathom to your project, yarn add fathom-client, then you’ll need to load it appropriately in pages/_app.js. The script is located at https://aardvark.hackclub.com/script.js.

Example file with Fathom
import React, { useEffect } from 'react'
import { useRouter } from 'next/router'
import NextApp from 'next/app'
import Head from 'next/head'

import Meta from '@hackclub/meta'
import '@hackclub/theme/fonts/reg-bold.css'
import theme from '../lib/theme'
import { ThemeProvider } from 'theme-ui'
import * as Fathom from 'fathom-client'

const App = ({ Component, pageProps }) => {
  const router = useRouter()

  useEffect(() => {
    Fathom.load('YOURCODE', {
      includedDomains: ['hackclub.com'],
      url: 'https://aardvark.hackclub.com/script.js'
    })
    const onRouteChangeComplete = () => Fathom.trackPageview()
    router.events.on('routeChangeComplete', onRouteChangeComplete)
    return () => {
      router.events.off('routeChangeComplete', onRouteChangeComplete)
    }
  }, [])

  return (
    <ThemeProvider theme={theme}>
      <Meta as={Head} />
      <Component {...pageProps} />
    </ThemeProvider>
  )
}

export default App

Deployment

Deploy with Vercel

We recommend using Vercel for deployment. It requires no configuration, is totally free for personal projects, and supports all the features of Next.js with the best performance. Refer to their documentation for more details.

You can also deploy your site to Netlify, which is also free. Refer to their documentation on the necessary configuration.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].