|
| 1 | + |
| 2 | + |
| 3 | +## Features |
| 4 | + |
| 5 | +The greatest care is devoted to a solid, clear, comprehensive, understandable, maintainable and customizable code structure. |
| 6 | + |
| 7 | +#### Astro |
| 8 | + |
| 9 | +- Latest Astro, statically generated, high performance |
| 10 | +- Post and Project content collections for `.mdx` content |
| 11 | +- Support for both Tags (1:N) and Categories (1:1) relations |
| 12 | +- Astro view transitions that track Post across all the pages |
| 13 | +- Astro optimized images with all image sizes and breakpoints centralized into a single place as constants |
| 14 | +- Pagination for both blog and projects pages |
| 15 | +- Environment variable controlled preview mode for draft posts and projects |
| 16 | +- RSS and Json feed endpoints |
| 17 | +- Enabled React integration for components that require client side interactivity |
| 18 | + |
| 19 | +#### Structure |
| 20 | + |
| 21 | +- Extracted configuration for integrations and plugins to keep `astro.config.ts` clean and readable |
| 22 | +- All website routes centralized into a single constant object |
| 23 | +- All file system paths centralized into a single constant object |
| 24 | +- Clear, separated, hierarchical, both centered and full-width layouts for all types of pages:`.mdx` pages, collections pages - Post and Project, and List pages - indexes with pagination |
| 25 | +- Extracted logic for querying content collections for clean and readable `getStaticPaths()` |
| 26 | + |
| 27 | +#### Styling |
| 28 | + |
| 29 | +- Both dark mode support, light/dark Tailwind modes and color themes support, semantic colors |
| 30 | +- Themes stored into separate files as CSS variables organized in two levels |
| 31 | +- Tailwind responsive styling, both spacings and typography |
| 32 | +- Three layer (base/components/utilities) CSS code organization |
| 33 | +- System for keeping typography styles in sync between markdown (prose) and custom components |
| 34 | +- Customized typography plugin prose class |
| 35 | +- Component styles extracted into CSS files with `class-variance-authority` for variants |
| 36 | +- `tailwind-merge` and `clsx` for dynamic class names |
| 37 | + |
| 38 | +#### SEO and Metadata |
| 39 | + |
| 40 | +- Centralized and typed metadata for all types of pages, with defaults |
| 41 | +- Open Graph image endpoint with Satori template generated images for all pages with hero image and random gradient background |
| 42 | +- Sitemap generated at build-time |
| 43 | +- Custom styled 404 page |
| 44 | + |
| 45 | +#### Website |
| 46 | + |
| 47 | +- Organized assets structure for both optimized (`/src`) and un-optimized (`/public`) images with extracted defaults |
| 48 | +- `astro-icon` package supporting both material design (`mdi`) icons and local SVG's |
| 49 | +- Paginated list pages for filtering posts: by tag - `/tags`, by category - `/categories`, by both - `/explore` - Explore (Archive) page |
| 50 | +- Collapsible navbar with items stored as array and active item for the current route |
| 51 | +- Table of contents for blog posts |
| 52 | +- Design system with `.mdx` pages available at `/design` path for clear preview and debugging of all visual components |
| 53 | +- Share component supporting Twitter, Facebook, Reddit, LinkedIn and Hackernews |
| 54 | + |
| 55 | +#### External libraries |
| 56 | + |
| 57 | +- Comments with Giscus and dark mode support |
| 58 | +- `astro-embed` for embedding tweets, YouTube and Vimeo videos, and Open Graph links |
| 59 | +- Embedded code syntax highlighting using `expressive-code`integration |
| 60 | + |
| 61 | +#### Types |
| 62 | + |
| 63 | +- Fully Typescript, all types are located in a separate folder |
| 64 | +- Centralized Zod schemas for Post, Project and Config models with proper defaults to prevent runtime exceptions |
| 65 | +- Fully typed and build-time validated config and environment variables |
| 66 | +- Abstracted Post and Project collection models that can include additional fields like calculated reading time |
| 67 | + |
| 68 | +#### Development |
| 69 | + |
| 70 | +- Typescript path aliases for clean and organized imports |
| 71 | +- Prettier formatting with sorted imports |
| 72 | +- ESLint syntax checking |
| 73 | + |
| 74 | +#### Deployment |
| 75 | + |
| 76 | +- Latest git commit info is included in the website footer for easy identification of currently deployed version |
| 77 | +- Production deployments with Github Pages, Nginx and Docker image |
| 78 | +- All three deployment methods are supported both in Github Actions and locally |
| 79 | +- The same bash scripts reused for both Github Actions and local deployments for easy debugging locally |
| 80 | +- Support for building both `x86` and `arm` Docker images |
| 81 | + |
| 82 | +## Installation and running |
| 83 | + |
| 84 | +### Development |
| 85 | + |
| 86 | +```bash |
| 87 | +# install packages |
| 88 | +yarn install |
| 89 | + |
| 90 | +# copy and set environment variables |
| 91 | +cp .env.development.example .env.development |
| 92 | + |
| 93 | +# run development server and visit http://localhost:3000 |
| 94 | +yarn dev |
| 95 | + |
| 96 | +# delete node_modules and yarn.lock |
| 97 | +yarn clean |
| 98 | +``` |
| 99 | + |
| 100 | +### Production |
| 101 | + |
| 102 | +```bash |
| 103 | +# copy and set environment variables |
| 104 | +cp .env.production.example .env.production |
| 105 | + |
| 106 | +# build website |
| 107 | +yarn build |
| 108 | + |
| 109 | +# run website |
| 110 | +yarn start |
| 111 | +``` |
| 112 | + |
| 113 | +## Deployment |
| 114 | + |
| 115 | +```bash |
| 116 | + |
| 117 | +# deploy local /dist folder to the remote Nginx server |
| 118 | +yarn deploy:nginx |
| 119 | +``` |
| 120 | + |
| 121 | +## Roadmap |
| 122 | + |
| 123 | +- Add accessibility attributes |
| 124 | +- Add image gallery page |
| 125 | +- Add remote markdown page |
| 126 | +- Validate config with `astro:env` |
| 127 | +- Render `.mdx` for RSS using component containers |
| 128 | +- Review and improve ESLint, (strictest) Typescript and Prettier configs |
| 129 | +- Improve visual design |
0 commit comments