Compare commits
No commits in common. "71707e495b95741db1154bb03d15e692fc8eb6e2" and "2b3bf5279627650ab8f6a7a333c69cfba0bb7205" have entirely different histories.
71707e495b
...
2b3bf52796
7 changed files with 4 additions and 29 deletions
|
|
@ -1 +0,0 @@
|
||||||
{"version":"1.21.0"}
|
|
||||||
15
.gitignore
vendored
15
.gitignore
vendored
|
|
@ -35,20 +35,9 @@ nul
|
||||||
# Qwen Code settings
|
# Qwen Code settings
|
||||||
.qwen/
|
.qwen/
|
||||||
|
|
||||||
# Astro & TS
|
# Astro cache
|
||||||
.astro/
|
.astro/
|
||||||
src/env.d.ts
|
**/.astro/
|
||||||
.temp/
|
|
||||||
.cache/
|
|
||||||
|
|
||||||
# VS Code settings (для вложенных директорий)
|
# VS Code settings (для вложенных директорий)
|
||||||
**/.vscode/
|
**/.vscode/
|
||||||
|
|
||||||
# PocketBase
|
|
||||||
pb_data/
|
|
||||||
*.db
|
|
||||||
*.db-shm
|
|
||||||
*.db-wal
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,5 @@ Disallow: /auth/
|
||||||
Disallow: /404
|
Disallow: /404
|
||||||
Disallow: /blog/search
|
Disallow: /blog/search
|
||||||
|
|
||||||
# url файла sitemap после деплоя проекта
|
|
||||||
Sitemap: https://avtourist-surgut.ru/sitemap-index.xml
|
Sitemap: https://avtourist-surgut.ru/sitemap-index.xml
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import RelatedPosts from '@components/blog/RelatedPosts.astro';
|
||||||
import ArticleTableOfContents from '@components/blog/ArticleTableOfContents.astro';
|
import ArticleTableOfContents from '@components/blog/ArticleTableOfContents.astro';
|
||||||
import { getCollection, getEntry, render } from 'astro:content';
|
import { getCollection, getEntry, render } from 'astro:content';
|
||||||
|
|
||||||
export const prerender = true;
|
export const prerender = false;
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const posts = await getCollection('blog') as { id: string; data: Record<string, any> }[];
|
const posts = await getCollection('blog') as { id: string; data: Record<string, any> }[];
|
||||||
|
|
|
||||||
|
|
@ -9,18 +9,6 @@ import CTA from '@components/base/CTA.astro';
|
||||||
import SearchModal from '@components/base/SearchModal.astro';
|
import SearchModal from '@components/base/SearchModal.astro';
|
||||||
import { getCollection } from 'astro:content';
|
import { getCollection } from 'astro:content';
|
||||||
|
|
||||||
export const prerender = true;
|
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
|
||||||
const posts = await getCollection('blog');
|
|
||||||
const POSTS_PER_PAGE = 6;
|
|
||||||
const totalPages = Math.ceil(posts.length / POSTS_PER_PAGE);
|
|
||||||
|
|
||||||
return Array.from({ length: totalPages }, (_, i) => ({
|
|
||||||
params: { page: String(i + 2) }, // Начинаем со 2-й страницы (1-я это /blog/)
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
const posts = await getCollection('blog');
|
const posts = await getCollection('blog');
|
||||||
|
|
||||||
// Сортируем посты по дате (новые сверху)
|
// Сортируем посты по дате (новые сверху)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
"dev": "bun run scripts/dev.js",
|
"dev": "bun run scripts/dev.js",
|
||||||
"dev:backend": "cd backend && ./pocketbase.exe serve",
|
"dev:backend": "cd backend && ./pocketbase.exe serve",
|
||||||
"dev:frontend": "cd frontend && bun dev",
|
"dev:frontend": "cd frontend && bun dev",
|
||||||
"build:frontend": "cd frontend && bun build",
|
"build:frontend": "cd frontend && bun run build",
|
||||||
"preview:frontend": "cd frontend && bun run preview"
|
"preview:frontend": "cd frontend && bun run preview"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue