https://github.com/defite/defite.ru
My home page and blog
https://github.com/defite/defite.ru
11ty dark-theme
Last synced: about 2 months ago
JSON representation
My home page and blog
- Host: GitHub
- URL: https://github.com/defite/defite.ru
- Owner: Defite
- Created: 2025-01-01T13:02:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-15T21:14:25.000Z (over 1 year ago)
- Last Synced: 2025-02-15T22:22:51.962Z (over 1 year ago)
- Language: Astro
- Homepage: https://defite-ru.vercel.app
- Size: 855 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is repository for my home page. It is built with [Astro](https://astro.build/), [Tailwind CSS](https://tailwindcss.com/) and is deployed into [Vercel](https://vercel.com/).
## Current state

The design is minimalistic and was made of parts I used on my old next.js landing. This design is not final and is work in progress.
## Project structure
```bash
├── public/
├── README.md
├── src
│ ├── assets/
│ ├── components
│ ├── consts.ts
│ ├── content
│ │ ├── blog
│ │ │ ├── hello-world.mdx
│ │ ├── drafts
│ │ │ ├── first-post.md
│ │ │ ├── markdown-style-guide.md
│ │ │ ├── quick-post-test.mdx
│ │ │ ├── second-post.md
│ │ │ ├── third-post.md
│ │ │ └── using-mdx.mdx
│ │ └── pages
│ │ ├── about-me.mdx
│ │ └── uses.mdx
│ ├── content.config.ts
│ ├── layouts/
│ ├── pages/
│ ├── styles/
│ └── types.ts
└── tsconfig.json
```
`/src/content/blog` folder contain all published posts, `/src/content/drafts` folder contains all unpublished posts, `/src/content/pages` folder is responsible for the contents of pages like "About me".
## Writing posts
To create a post you need to go to `/src/content/posts` and create `*.mdx` file there. There is some metainfo for this file.
### Quick post
Quick post is the post that doesn't have it's own single page, url and is rendered in a blog list without title. To create such post, create `*.mdx` file and paste there something like this:
```md
---
pubDate: 'Sep 22 2025'
quick: true
---
```
### Ordinary post
```md
---
title: Jam.dev
description: "Brief note about Jam.dev - Chrome extension which can capture screenshot, record tab or whole desktop and share link to 'bug report'."
excerpt: "Occasionally found usefull instrument which can solve every developer's pain - somebody found the bug, but you don't know all details about how, where and why."
pubDate: 'Jul 09 2024'
heroImage: '/src/assets/jam-dev.avif'
---
```
`excerpt` is useful to more control of text to cut and show in blog list. Hero image is first image in post that is show before the excerpt. Image is not always required, you can create posts without it.
### Posts with images
To create posts with images inside I use my own component `MdxImage`. I use it like this:
```mdx
import MdxImage from '../../components/MdxImage.astro';
```
To create gallery (it only creates a grid of MdxImages, I use `MdxGallery` component.
```mdx
import MdxGallery from '../../components/MdxGallery.astro';
```
It accepts names of files and searches `src/assets` folder for them. `withUrl` param indicates can you go to the original image by clicking on any image in the gallery.
### Posts with Youtube
Sadly, Youtube doesn't work in my country, but if you want to show posts with Youtube video player, here is the component for it.
```mdx
import MdxYoutube from '../../components/MdxYoutube.astro';
```
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |