@@ -6,19 +6,6 @@ export async function setupAddons(projectDir: string, addons: ProjectAddons[]) {
66 if ( addons . includes ( "docker" ) ) {
77 await setupDocker ( projectDir ) ;
88 }
9-
10- if ( addons . includes ( "github-actions" ) ) {
11- await setupGithubActions ( projectDir ) ;
12- }
13-
14- if ( addons . includes ( "SEO" ) ) {
15- // log.info(
16- // pc.yellow(
17- // "SEO feature is still a work-in-progress and will be available in a future update.",
18- // ),
19- // );
20- await setupSEO ( projectDir ) ;
21- }
229}
2310
2411async function setupDocker ( projectDir : string ) {
@@ -103,181 +90,3 @@ node_modules
10390 dockerignoreContent ,
10491 ) ;
10592}
106-
107- async function setupGithubActions ( projectDir : string ) {
108- const workflowsDir = path . join ( projectDir , ".github/workflows" ) ;
109- await fs . ensureDir ( workflowsDir ) ;
110-
111- const ciWorkflowContent = `name: CI
112-
113- on:
114- push:
115- branches: [ main ]
116- pull_request:
117- branches: [ main ]
118-
119- jobs:
120- build:
121- runs-on: ubuntu-latest
122-
123- steps:
124- - uses: actions/checkout@v3
125-
126- - name: Setup Node.js
127- uses: actions/setup-node@v3
128- with:
129- node-version: '18'
130- cache: 'npm'
131-
132- - name: Install dependencies
133- run: npm ci
134-
135- - name: Type check
136- run: npm run check-types
137-
138- - name: Build
139- run: npm run build
140- ` ;
141-
142- const deployWorkflowContent = `name: Deploy
143-
144- on:
145- push:
146- branches: [ main ]
147-
148- # Enable manual trigger
149- workflow_dispatch:
150-
151- jobs:
152- deploy:
153- runs-on: ubuntu-latest
154-
155- steps:
156- - uses: actions/checkout@v3
157-
158- - name: Setup Node.js
159- uses: actions/setup-node@v3
160- with:
161- node-version: '18'
162- cache: 'npm'
163-
164- - name: Install dependencies
165- run: npm ci
166-
167- - name: Build
168- run: npm run build
169-
170- # Add your deployment steps here
171- # This is just a placeholder for your actual deployment logic
172- - name: Deploy
173- run: echo "Add your deployment commands here"
174- ` ;
175-
176- await fs . writeFile ( path . join ( workflowsDir , "ci.yml" ) , ciWorkflowContent ) ;
177- await fs . writeFile (
178- path . join ( workflowsDir , "deploy.yml" ) ,
179- deployWorkflowContent ,
180- ) ;
181- }
182-
183- async function setupSEO ( projectDir : string ) {
184- const robotsContent = `# Instructions: Customize this file to control how search engines crawl your site
185- # Learn more: https://developers.google.com/search/docs/advanced/robots/create-robots-txt
186-
187- # Allow all crawlers (default)
188- User-agent: *
189- Allow: /
190-
191- # Disallow crawling of specific directories (uncomment and customize as needed)
192- # Disallow: /admin/
193- # Disallow: /private/
194-
195- # Specify the location of your sitemap
196- Sitemap: https://yourdomain.com/sitemap.xml
197- ` ;
198-
199- await fs . writeFile (
200- path . join ( projectDir , "packages" , "client" , "robots.txt" ) ,
201- robotsContent ,
202- ) ;
203-
204- const sitemapContent = `<?xml version="1.0" encoding="UTF-8"?>
205- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
206-
207- <url>
208- <loc>https://yourdomain.com/</loc>
209- <lastmod>2025-03-01</lastmod>
210- <changefreq>weekly</changefreq>
211- <priority>1.0</priority>
212- </url>
213-
214- <url>
215- <loc>https://yourdomain.com/about</loc>
216- <lastmod>2025-03-01</lastmod>
217- <changefreq>monthly</changefreq>
218- <priority>0.8</priority>
219- </url>
220-
221- </urlset>
222- ` ;
223- await fs . writeFile (
224- path . join ( projectDir , "packages" , "client" , "sitemap.xml" ) ,
225- sitemapContent ,
226- ) ;
227-
228- const metaContent = `<!doctype html>
229- <html lang="en">
230-
231- <head>
232- <meta charset="UTF-8" />
233- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
234- <title>TanStack Router</title>
235- <meta name="description"
236- content="Replace this with your page description - keep it between 150-160 characters for optimal display in search results." />
237- <meta name="keywords" content="keyword1, keyword2, keyword3, customize based on your content" />
238- <meta name="robots" content="index, follow" />
239- <link rel="icon" href="/favicon.ico" />
240- <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
241- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
242- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
243-
244- <!-- OPEN GRAPH TAGS: Optimize how your content appears when shared on Facebook, LinkedIn, etc. -->
245- <meta property="og:title" content="Replace with your page title" />
246- <meta property="og:description"
247- content="Replace with your page description (typically the same as meta description)" />
248- <meta property="og:image" content="path-to-image" />
249- <meta property="og:type" content="website" />
250- <meta property="og:site_name" content="Your Site Name" />
251-
252- <!-- TWITTER CARD TAGS: Optimize how your content appears when shared on Twitter -->
253- <meta name="twitter:card" content="summary_large_image" />
254- <meta name="twitter:title" content="Replace with your page title" />
255- <meta name="twitter:description" content="Replace with your page description" />
256- <meta name="twitter:image" content="path-to-image" />
257- <meta name="twitter:creator" content="@yourtwitterhandle" />
258-
259- <!-- STRUCTURED DATA: Help search engines understand your content better (JSON-LD format) -->
260- <script type="application/ld+json">
261- {
262- "@context": "https://schema.org",
263- "@type": "WebPage",
264- "name": "Replace with your page title",
265- "description": "Replace with your page description",
266- "url": "https://yourdomain.com/your-page-url"
267- }
268- </script>
269- </head>
270-
271- <body>
272- <div id="app"></div>
273- <script type="module" src="/src/main.tsx"></script>
274- </body>
275-
276- </html>
277- ` ;
278-
279- await fs . writeFile (
280- path . join ( projectDir , "packages" , "client" , "index.html" ) ,
281- metaContent ,
282- ) ;
283- }
0 commit comments