111 lines
4.4 KiB
Markdown
111 lines
4.4 KiB
Markdown
# Site Structure
|
|
|
|
This is a local static site built with Astro. The current exported HTML source
|
|
is kept in `website/`, while Astro emits the served site into `dist/`.
|
|
|
|
## Root
|
|
|
|
- `website/index.html` - home page
|
|
- `website/about.html` - about page
|
|
- `website/contact.html` - contact page
|
|
- `website/*.html` - other top-level pages
|
|
- `website/blog/YYYY/MM/DD/*.html` - dated blog posts
|
|
- `website/blog/categories/*.html` - blog category archive pages
|
|
- `website/blog/tags/*.html` - blog tag archive pages
|
|
- `website/speeches/index.html` - main speeches archive
|
|
- `website/speeches/rev-dr-sun-myung-moon/*.html` - yearly speech archive pages
|
|
- `website/speeches/categories/*.html` - speech category archive pages
|
|
- `website/PAGES.md` - map of old folder paths to current HTML paths
|
|
- `content/speeches/<year>/*.md` - extracted speech content by speech year
|
|
- `content/speeches/mrs-hak-ja-han-moon/*.md` - extracted Mrs. Hak Ja Han Moon speeches
|
|
- `content/blog/<year>/*.md` - extracted non-speech blog content by publish year
|
|
- `content/README.md` - content archive notes
|
|
- `src/content/pages/*.html` - preserved body fragments for migrated public pages
|
|
- `src/pages/index.astro` - Astro home page route
|
|
- `src/pages/about.astro`, `src/pages/contact.astro`, `src/pages/events.astro`, `src/pages/services.astro`, `src/pages/videos.astro`, `src/pages/the-founders.astro` - migrated public page routes
|
|
- `src/pages/[...route].ts` - Astro endpoint for the remaining exported HTML archive pages
|
|
- `src/lib/static-pages.ts` - maps `website/` files to Astro static routes and excludes migrated pages from the catch-all
|
|
- `src/components/` - Astro shared layout components
|
|
- `dist/` - generated site output, ignored by git
|
|
- `css/` - site-level stylesheets
|
|
- `css/theme.css` - extracted Parabola inline theme settings
|
|
- `css/site.css` - extracted shared site fixes and homepage/frontpage rules
|
|
- `js/` - site-level scripts
|
|
- `assets/` - images, PDFs, fonts, theme files, uploads, and vendor files
|
|
- `docs/` - maintainer documentation
|
|
- `scripts/components.mjs` - shared nav/sidebar/footer components
|
|
- `scripts/render-shared-layout.mjs` - renders shared layout components into pages
|
|
- `scripts/organize-content.mjs` - organizes exported blog and speech pages
|
|
- `scripts/copy-static-assets.mjs` - copies `assets/`, `css/`, and `js/` into `dist/`
|
|
- `scripts/extract-content.mjs` - extracts dated post pages into `content/`
|
|
- `scripts/extract-theme-css.mjs` - extracts repeated inline CSS into `css/theme.css` and `css/site.css`
|
|
- `.forgejo/` - deployment automation
|
|
|
|
## Shared Layout
|
|
|
|
The important public pages now render through Astro components:
|
|
`src/components/SiteLayout.astro` owns the document shell, header, navigation,
|
|
and footer, while `src/components/TwoColumnPage.astro` wraps standard
|
|
content/sidebar pages. Their preserved page bodies live in
|
|
`src/content/pages/`.
|
|
|
|
The large blog and speech archive remains static exported HTML served through
|
|
`src/pages/[...route].ts`. Common navigation, sidebar, and footer markup for
|
|
those exported files is still generated from `scripts/components.mjs`; run
|
|
`npm run render:layout` after editing those legacy components.
|
|
|
|
## Content Archive
|
|
|
|
Run `npm run extract:content` to regenerate the Markdown content archive from
|
|
`website/blog/`. The generated Markdown keeps the original post body HTML inside
|
|
the file so formatting is preserved while metadata becomes frontmatter.
|
|
|
|
## Asset Layout
|
|
|
|
- `css/block-library.css` - WordPress block styles used by the pages
|
|
- `css/theme.css` - CSS extracted from the repeated Parabola inline export
|
|
- `css/site.css` - shared site fixes, shortcode rule, and homepage slider/frontpage CSS
|
|
- `js/jquery.min.js` - shared jQuery dependency used by the pages
|
|
- `assets/theme/` - exported theme styles, scripts, fonts, and images
|
|
- `assets/vendor/` - exported third-party plugin/vendor assets
|
|
- `assets/uploads/` - uploaded images and PDFs used by content pages
|
|
|
|
## Local Preview
|
|
|
|
Run:
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Then open Astro's local URL, usually:
|
|
|
|
```text
|
|
http://localhost:4321
|
|
```
|
|
|
|
Run the build health check:
|
|
|
|
```bash
|
|
npm run check
|
|
```
|
|
|
|
For a production-style Astro preview, build first:
|
|
|
|
```bash
|
|
npm run build
|
|
npm run preview
|
|
```
|
|
|
|
Then open:
|
|
|
|
```text
|
|
http://localhost:4321
|
|
```
|
|
|
|
## Deployment
|
|
|
|
Astro emits a static site into `dist/`. Deployment should run `npm ci` and
|
|
`npm run build`, then publish or serve the generated `dist/` directory. Use
|
|
`npm run start` only for Astro-based preview jobs that need to serve the built
|
|
output directly.
|