forked from theirc/signpost-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.ts
78 lines (63 loc) · 3.14 KB
/
constants.ts
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
import { AlgoliaSearchIndex } from '@ircsignpost/signpost-base/dist/src/search-common';
export const SITE_TITLE = 'Gidan Bayani';
// Cache statically generated pages for 1 hour. The timeout was chosen
// arbitrarily. Our website has static, non-urgent resources, so we probably do
// not need to serve content faster.
export const REVALIDATION_TIMEOUT_SECONDS: number = 1 * 60 * 60;
// The "about us" article ID.
//
export const ABOUT_US_ARTICLE_ID: number = 13578602268317;
// The information hierary of the website.
// Set to true for the category -> section -> article hierarchy, similar to that of United for Ukraine.
// Set to false for the "information" -> category -> article hierarchy, similar to that of Beporsed.
//
export const USE_CAT_SEC_ART_CONTENT_STRUCTURE = false;
// A mapping from category ID to a Material icon for that category.
export const CATEGORY_ICON_NAMES: { [key: string]: string } = {
'14991586565149': 'security',
'13578162616093': 'home',
};
// A mapping from section ID to a Material icon for that section.
export const SECTION_ICON_NAMES: { [key: string]: string } = {};
// A list of category IDs that the site should not display.
export const CATEGORIES_TO_HIDE: number[] = [13578145726749];
// A map from a locale code to Zendesk locale id used for dynamic content translations.
// https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/
// Keep in sync with locales configured in /next.config.js.
export const DYNAMIC_CONTENT_LOCALES: { [key: string]: number } = {
'en-us': 1,
};
export const ZENDESK_AUTH_HEADER = {
Authorization: 'Bearer ' + process.env.ZENDESK_OAUTH_TOKEN,
};
// TODO: Add your app's google analytics ids as local and server environment variables,
// and then add to this list. You may have two IDs, for example, during the migration
// from Universal Analytics to Google Analytics 4. See README.md for more details.
export const GOOGLE_ANALYTICS_IDS = [
process.env.NEXT_PUBLIC_GA_ID ?? '',
process.env.NEXT_PUBLIC_GA4_ID ?? '',
];
// Algolia search app ID, Search API key and search index name:
// https://www.algolia.com/account/api-keys/
export const ALGOLIA_SEARCH_APP_ID = 'BWATZIXLX6';
export const ALGOLIA_SEARCH_API_KEY = '0d9093280e7b2bc2b6ca12ed4180fd0a';
export const ALGOLIA_SEARCH_API_KEY_WRITE =
process.env.ALGOLIA_SEARCH_API_KEY_WRITE ?? '';
// TODO: create Algolia indexes for Articles and Queries and replace the names here.
// See README for more info on how to create indexes.
export const ALGOLIA_ARTICLE_INDEX_NAME = 'zendesk_signpost-nigeria_articles';
export const ALGOLIA_QUERY_INDEX_NAME =
'zendesk_signpost-nigeria_articles_query_suggestions';
export const SEARCH_BAR_INDEX: AlgoliaSearchIndex = {
appId: ALGOLIA_SEARCH_APP_ID,
publicApiKey: ALGOLIA_SEARCH_API_KEY,
indexName: ALGOLIA_QUERY_INDEX_NAME,
};
export const SEARCH_RESULTS_PAGE_INDEX: AlgoliaSearchIndex = {
appId: ALGOLIA_SEARCH_APP_ID,
publicApiKey: ALGOLIA_SEARCH_API_KEY,
indexName: ALGOLIA_ARTICLE_INDEX_NAME,
};
export const DIRECTUS_AUTH_TOKEN = process.env.DIRECTUS_TOKEN ?? '';
export const DIRECTUS_COUNTRY_ID = 27;
export const DIRECTUS_INSTANCE = 'https://directus-irc.azurewebsites.net/';