This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Image, ImageProps } from "next/image"; | |
import { createClient } from "contentful"; | |
type ContentfulImage = { | |
fields: { | |
file: { | |
url: string; | |
details: { | |
image: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Image, ImageProps } from "next/image"; | |
type ImageLoaderProps = Omit<ImageProps, "src"> & { | |
src: string; | |
}; | |
class ImageLoader extends React.Component<ImageLoaderProps> { | |
public loader({ src, width, quality }: ImageLoaderProps): string { | |
return `${src}?w=${width}&q=${quality || 75}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { withRouter, Router } from 'next/router'; | |
interface IndexProps { | |
router: Router; | |
} | |
interface IndexState { | |
activeLink: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import required packages and functions | |
const fs = require('fs'); | |
const { SitemapStream, streamToPromise } = require('sitemap'); | |
const { createGzip } = require('zlib'); | |
const { getSiteMapUrls } = require('@uniformdev/next-jss/server'); | |
// Set up Uniform and Contentful credentials | |
const UNIFORM_API_KEY = process.env.UNIFORM_API_KEY; | |
const CONTENTFUL_SPACE_ID = process.env.CONTENTFUL_SPACE_ID; | |
const CONTENTFUL_ACCESS_TOKEN = process.env.CONTENTFUL_ACCESS_TOKEN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GetStaticPaths, GetStaticProps } from 'next'; | |
type Locale = 'en-US' | 'es' | 'hm'; | |
type PageData = { | |
// Define the properties you need for your page data | |
title: string; | |
content: string; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"$id": "https://gist.githubusercontent.com/treckstar/175547806360c7f2c81cc961ad8037f1/raw/treckstar.omp.json", | |
"type": "object", | |
"title": "The Oh My Posh theme definition", | |
"description": "https://ohmyposh.dev/docs/configuration/overview", | |
"definitions": { | |
"color": { | |
"anyOf": [ | |
{ |
OlderNewer