-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrameworks.js
More file actions
157 lines (156 loc) · 3.35 KB
/
Copy pathFrameworks.js
File metadata and controls
157 lines (156 loc) · 3.35 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/**
* Frameworks.js
* Registry of framework profiles for Zero-Config CMS.
* Each profile defines its own signals for detection, default commands, and ports.
*/
export const FRAMEWORKS = [
{
id: 'nextjs',
name: 'Next.js',
signals: {
deps: ['next'],
files: ['next.config.js', 'next.config.mjs']
},
defaults: {
command: 'npx next dev',
port: 3000,
contentPaths: ['/pages', '/app', '/src/pages', '/src/app', '/content', '/src/content']
}
},
{
id: 'hexo',
name: 'Hexo',
signals: {
deps: ['hexo', 'hexo-cli'],
files: ['_config.yml', 'scaffolds']
},
defaults: {
command: 'npx hexo server',
port: 4000,
contentPaths: ['/source/_posts', '/source']
},
tagger: () => `
hexo.extend.filter.register('after_render:html', function(html, data) {
if (data.source) {
const sourcePath = 'source/' + data.source;
return html.replace('<body', '<body data-cms-source="' + sourcePath + '"');
}
return html;
});
`
},
{
id: 'astro',
name: 'Astro',
signals: {
deps: ['astro'],
files: ['astro.config.mjs', 'astro.config.ts', 'astro.config.js']
},
defaults: {
command: 'npx astro dev',
port: 4321,
contentPaths: ['/src/content', '/src/pages', '/content']
}
},
{
id: 'hugo',
name: 'Hugo',
signals: {
files: ['hugo.toml', 'config.toml', 'hugo.yaml', 'config.yaml', 'hugo.json', 'config.json']
},
defaults: {
command: 'hugo server --bind 0.0.0.0 --appendPort=false',
port: 1313,
contentPaths: ['/content']
}
},
{
id: 'nuxt',
name: 'Nuxt',
signals: {
deps: ['nuxt', 'nuxt3'],
files: ['nuxt.config.js', 'nuxt.config.ts']
},
defaults: {
command: 'npx nuxi dev',
port: 3000,
contentPaths: ['/content', '/pages']
}
},
{
id: 'eleventy',
name: 'Eleventy',
signals: {
deps: ['@11ty/eleventy'],
files: ['.eleventy.js', 'eleventy.config.js']
},
defaults: {
command: 'npx @11ty/eleventy --serve',
port: 8080,
contentPaths: ['/content', '/posts', '/src']
}
},
{
id: 'sveltekit',
name: 'SvelteKit',
signals: {
deps: ['@sveltejs/kit'],
files: ['svelte.config.js']
},
defaults: {
command: 'npx vite dev',
port: 5173,
contentPaths: ['/src/routes', '/content']
}
},
{
id: 'jekyll',
name: 'Jekyll',
signals: {
files: ['_config.yml', 'Gemfile']
},
defaults: {
command: 'bundle exec jekyll serve --host 0.0.0.0',
port: 4000,
contentPaths: ['/_posts', '/pages']
}
},
{
id: 'vitepress',
name: 'VitePress',
signals: {
deps: ['vitepress'],
files: ['.vitepress/config.js', '.vitepress/config.ts']
},
defaults: {
command: 'npx vitepress dev',
port: 5173,
contentPaths: ['/docs', '/src']
}
},
{
id: 'zola',
name: 'Zola',
signals: {
files: ['config.toml']
},
defaults: {
command: 'zola serve --interface 0.0.0.0',
port: 1111,
contentPaths: ['/content']
}
}
];
export const GENERIC_VITE = {
id: 'vite',
name: 'Vite (Generic)',
signals: {
deps: ['vite'],
files: ['vite.config.js', 'vite.config.ts']
},
defaults: {
command: 'npx vite',
port: 5173,
contentPaths: ['/src']
}
};