-
Notifications
You must be signed in to change notification settings - Fork 1
/
appConfig.js
102 lines (99 loc) · 2.79 KB
/
appConfig.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
import rehypePrettyCode from 'rehype-pretty-code';
import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
import rehypeSlug from 'rehype-slug';
import rehypeHeadingsAutoLink from 'rehype-autolink-headings';
import rehypeSectionize from '@hbsnow/rehype-sectionize';
import rehypeExternalLinks from 'rehype-external-links';
import themeJSON from './src/theme/syntax-highlight.json';
import remarkReadingTime from './scripts/remark-reading-time.js';
export const APP_CONFIG = {
SITE_URL: 'https://fatehak.dev',
META: {
title: 'FatehAK - Front-End Engineer, Open Sourcerer',
description: 'Software Engineer. Love engineering clean and performant web applications',
appName: 'fatehak.dev',
appBackground: '#101822',
},
USER: {
name: 'FatehAK',
shortName: 'Fateh',
social: {
twitter: '@Fateh_AK_',
email: 'hi@fatehak@@dev',
linkedin: 'https://linkedin.com/in/fatehak',
github: 'https://github.com/fatehak',
behance: 'https://www.behance.net/fateh_ak_/projects',
},
},
CLOUDFLARE_ANALYTICS_TOKEN: '829042926c0f40708468a2bfaddf496e',
};
export const COMPRESSION_CONFIG = {
js: false,
html: {
removeAttributeQuotes: false,
},
img: false,
svg: {
multipass: true,
plugins: [
{
name: 'preset-default',
params: {
overrides: {
cleanupNumericValues: false,
removeViewBox: false, // https://github.com/svg/svgo/issues/1128
},
cleanupIDs: {
minify: false,
remove: false,
},
convertPathData: false,
},
},
'sortAttrs',
{
name: 'addAttributesToSVGElement',
params: {
attributes: [{ xmlns: 'http://www.w3.org/2000/svg' }],
},
},
],
},
logger: 0,
};
export const MDX_CONFIG = {
syntaxHighlight: false,
extendDefaultPlugins: true,
remarkPlugins: [remarkReadingTime],
rehypePlugins: [
rehypeAccessibleEmojis,
rehypeSlug,
[rehypeHeadingsAutoLink, { test: ['h2', 'h3'] }],
[
rehypePrettyCode,
{
keepBackground: false,
theme: themeJSON,
tokensMap: {
// for inline code blocks
fn: 'entity.name.function',
},
onVisitLine(node) {
// allow empty lines to be copy/pasted
if (node.children.length === 0) {
node.children = [{ type: 'text', value: ' ' }];
}
},
onVisitHighlightedLine(node) {
node.properties.className.push('highlighted');
},
onVisitHighlightedWord(node) {
// each word node has no className by default.
node.properties.className = ['word'];
},
},
],
[rehypeExternalLinks, { target: '_blank', rel: 'noopener noreferrer' }],
rehypeSectionize,
],
};