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
const blocks = `blocks[] { | |
..., | |
photos[] { | |
..., | |
"metadata": asset->metadata, | |
}, | |
markDefs[] { | |
..., | |
_type == "internalLink" => { | |
"slug": @->slug.current, |
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
{ | |
name: 'collection', | |
title: 'Terminologiesammlung', | |
type: 'string', | |
options: { | |
list: [{ title: 'BSV 10-15', value: 'bsv_10-15' }], | |
}, | |
}, | |
{ | |
name: 'domain', |
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 S from '@sanity/base/structure-builder' | |
import userStore from 'part:@sanity/base/user' | |
// remember to add rxjs/operators to your dependencies with npm or yarn | |
import { | |
map | |
} from 'rxjs/operators' | |
export default () => userStore.currentUser.pipe( | |
map(({user}) => { | |
const {role} = user |
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
:root { | |
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53); | |
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22); | |
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06); | |
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035); | |
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335); | |
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); | |
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1); |
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
const axios = require('axios') | |
const crypto = require('crypto') | |
const region = process.env.MAILCHIMP_API_KEY.split('-')[1] | |
const apiRoot = `https://${region}.api.mailchimp.com/3.0/lists/${process.env.MAILCHIMP_LIST_ID}/members/` | |
function deleteSubmission(id) { | |
const url = `https://api.netlify.com/api/v1/submissions/${id}?access_token=${process.env.NETLIFY_ACCESS_TOKEN}` | |
return axios.delete(url) |
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
name: Trigger Backup | |
on: | |
schedule: | |
# Runs at 04:00 UTC on the 1st and 17th of every month | |
- cron: '0 4 */16 * *' | |
jobs: | |
build: | |
name: Trigger Netlify Function | |
runs-on: ubuntu-latest | |
steps: |
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
polyfill: { | |
features: [ | |
{ | |
require: 'object.entries', | |
detect: () => 'entries' in window.Object, | |
install: entries => entries.shim(), | |
}, | |
{ | |
require: 'url-search-params-polyfill', | |
detect: () => 'URLSearchParams ' in window, |
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
// Find the weakest Pokémon overall | |
*[]{ | |
"overall": base.HP + base.Attack + base.Defense + base["Sp. Attack"] + base["Sp. Defense"] + base.Speed, | |
"name": name.english, | |
}|order(overall)[0] |
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
const differenceInDays = require('date-fns/differenceInDays') | |
const parseISO = require('date-fns/parseISO') | |
const sanity = require('@sanity/client') | |
const exportDataset = require('@sanity/export') | |
const { google } = require('googleapis') | |
const fetch = require('node-fetch') | |
const path = require('path') | |
const fs = require('fs') | |
const FOLDER_ID = process.env.FOLDER_ID |
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
const isDraft = id => id.includes('drafts') | |
export default function resolveProductionUrl(document) { | |
if (!isDraft(document._id)) return undefined | |
const url = 'https://your-website.com' | |
if (document._type === 'recipe') { | |
return `${url}/rezepte/preview/?preview_id=${document._id}` | |
} |
NewerOlder