SNIPPET
bgheneti

Bgheneti.Github.Io

Personal portfolio website built with Astro featuring responsive design, content collections for projects and links, and modern CSS. Optional Integration with Obsidian for content. Auto-deployed to GitHub Pages and/or Cloudflare.

Astro-Powered Static-Site with Obsidian Integration

Website Status Cloudflare Status Deploy Status

Personal portfolio website built with Astro, featuring projects, links, and a clean, responsive design.

The design was originally adapted from the Gridsome x Forestry starter template for Vue.js. This repo only uses Astro.

✨ Features

  • Responsive Design - Mobile-first with hamburger navigation
  • Content Collections - Markdown-based projects and links
  • Code Highlighting - Prism.js syntax highlighting
  • Modern CSS - Custom properties, animations, and utilities
  • Touch-Friendly - Proper mobile interactions and hover states
  • Fast Performance - Static site generation with Astro

šŸš€ Project Structure

/
ā”œā”€ā”€ public/                     # Static assets
│   ā”œā”€ā”€ code-highlight.css      # Prism.js styling
│   └── favicon.png
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ components/
│   │   ā”œā”€ā”€ Header.astro        # Navigation with mobile menu
│   │   ā”œā”€ā”€ Hero.astro          # Home page hero section
│   │   ā”œā”€ā”€ Footer.astro        # Site footer
│   │   ā”œā”€ā”€ ProjectsGrid.astro  # Project display grid
│   │   └── LinksGrid.astro     # Links display grid
│   ā”œā”€ā”€ content/
│   │   ā”œā”€ā”€ config.ts           # Content collections config
│   │   ā”œā”€ā”€ assets/             # Images and other assets for projects
│   │   ā”œā”€ā”€ projects/           # Project markdown files
│   │   ā”œā”€ā”€ links/              # Link markdown files
│   │   └── settings/           # Site settings and theme config
│   ā”œā”€ā”€ layouts/
│   │   └── Layout.astro        # Base layout with global styles
│   ā”œā”€ā”€ pages/
│   │   ā”œā”€ā”€ index.astro         # Home page
│   │   ā”œā”€ā”€ projects/
│   │   │   ā”œā”€ā”€ index.astro     # Projects listing
│   │   │   └── [...slug].astro # Individual project pages
│   │   └── links/
│   │       └── index.astro     # Links page
│   └── plugins/
│       └── remark-relative-images.js # Plugin for relative image paths
ā”œā”€ā”€ data/
│   └── theme.json              # Site configuration and content
ā”œā”€ā”€ .github/workflows/
│   └── deploy.yml              # GitHub Pages deployment
└── astro.config.mjs            # Astro configuration

šŸ§ž Commands

All commands are run from the root of the project:

CommandAction
npm installInstall dependencies
npm run devStart local dev server at localhost:4321
npm run buildBuild production site to ./dist/
npm run previewPreview build locally before deploying
npm run astro checkRun type checking

šŸ”§ Configuration

Content Management

  • Projects: Add .md files to /src/content/projects/
  • Links: Add .md files to /src/content/links/
  • Assets: Add images and media to /src/content/assets/
  • Site Data: Edit /data/theme.json for site settings
  • Theme Settings: Edit /src/content/settings/theme.md for additional theme configuration
  • Obsidian Integration: Optional - open /src/content/ as an Obsidian vault for rich markdown editing. Obsidian settings, templates (for Links and Projects), and all content (Links, Projects, and Front Matter) are stored here.

Styling

  • Global Styles: /src/layouts/Layout.astro
  • CSS Variables: Defined in Layout.astro for consistent theming
  • Component Styles: Scoped styles in each .astro component

Deployment

  • Auto-deploy: Pushes to template branch trigger GitHub Actions

  • Build: Creates static files in /dist/

  • Deploy: Files deployed to gh-pages branch and Cloudflare.

    • disable CloudFlare or gh-pages deployment by commenting out steps in .github/workflows/deploy.yml
    • If you use Cloudflare:
      • set CLOUDLFARE_API_TOKEN in repo secrets
      • set CLOUDLFARE_ACCOUNT_ID in repo secrets
      • update CLOUDFLARE_PROJECT_NAME in .github/workflows/deploy.yml
  • Live: Available at https://gheneti.com via Cloudflare

šŸŽØ Design System

The site uses a custom CSS design system with:

  • Color tokens: --color-base, --color-accent, etc.
  • Typography scale: --font-size-xs to --font-size-3xl
  • Spacing system: --spacing-xs to --spacing-3xl
  • Animation utilities: Fade-in animations with staggered delays
  • Responsive utilities: Mobile-first breakpoints

Related

How to Install

  1. Download the repository ZIP below
  2. Unzip it and find the CSS snippet file
  3. Move the CSS file into your vault's .obsidian/snippets/ folder
  4. Open Obsidian → Settings → Appearance → CSS Snippets → Enable it

Stats

Stars

24

Forks

2

License

MIT

Last updated 11mo ago

Categories

Tags

astrocloudflarecloudflare-pagescontent-collectionsdigital-gardengithub-pagesmarkdownmobile-firstnotesobsidianpersonal-websiteportfolioportfolio-websiteprismprojectsresponsive-designstatic-site-generatortypescriptweb-development