-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
110 lines (97 loc) · 2.85 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
const RECIPE_NAME = '<name>';
const yelpLocation = 'Bloomfield, NJ'; // no need for fancy formatting, just do it like this
/*
* RECIPE OPTIONS
* below are some options to customize how your recipes appear
* (these are mostly things that folks might want to change, but
* of course you can customize the code too)
*/
export default {
imageDir: './images',
outputDir: './output',
recipeDir: './recipes',
titleSuffix: ' - Recipe Book',
favicon: 'measuring-cup-favicon.svg',
includeHelpLinks: false,
/**
* **experimental**
* when enabled searches for double-quotes and makes them "curly quotes" (smart)
*/
useSmartQuotes: true,
/**
* **experimental**
* when enabled wraps `<img />` tags in link to open in new tab
*/
addImageLinks: true,
/**
* **experimental**
* when enabled looks in raw file for author's name
*/
findAuthor: true,
defaultTheme: 'default',
/**
* Options are:
* * 'content'
* * 'compact-list'
* * 'grid'
*/
initialIndexView: 'content',
/**
* help urls to include (will be listed in the order below)
* label = text displayed
* url = template url (put <name> where the search term
* goes, it will be auto-added later)
*/
helpURLs: [{
label: 'Image search',
url: `https://www.google.com/search?q=${RECIPE_NAME}&tbm=isch`,
},
{
label: 'Serious Eats',
url: `https://www.seriouseats.com/search?q=${RECIPE_NAME}&site=recipes`,
},
{
label: 'More recipes',
url: `https://www.google.com/search?q=${RECIPE_NAME}+recipe`,
},
{
label: 'Yelp (takeout pls)',
url: `https://www.yelp.com/search?find_loc=${yelpLocation}&find_desc=${RECIPE_NAME}`,
},
],
/**
* look in `config.imageDir` folder an image to display
* at the top of the recipe?
*
* * must be named the same thing as the recipe's file name
* * must have extension `jpg`, 'png`, or `webp`
*
* For example: "aloo-matar.md" would have an image "aloo-matar.jpg"
*
* Fail gracefully if an image doesn't exist, but you can
* turn it off entirely if you want
*/
lookForHeroImage: true,
/**
* turn text-only urls to links in these sections
* (in other sections, markdown links will work as normal)
*/
autoUrlSections: ['basedon'],
/**
* trim display text for long urls in 'based on' section
* @example
* const url = 'https://www.seriouseats.com/recipes/2012/01/aloo-matar.html'
* // would become:
* // www.seriouseats.com
*/
shortenURLs: true,
/**
* How to handle fractions within ingredient list's amount, should the app
* use standard fractions (such as 1/2) instead of special characters (such as ½)
* in your ingredient list, or leave them as-is, no changes (ignore).
*
* * false: leave as-is (no change)
* * true: prefer special characters, i.e. convert `1/2` to `½`
*/
useFractionSymbols: true,
};