Skip to content

Commit 75dd821

Browse files
authored
Merge pull request #10 from ak0r/preview
Preview
2 parents 9681ddf + 6788225 commit 75dd821

File tree

18 files changed

+449
-232
lines changed

18 files changed

+449
-232
lines changed

README.md

Lines changed: 100 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,116 @@
1-
# Astro Starter Kit: Minimal
1+
# 🌟 Astro Flexoki
22

3-
```sh
4-
npm create astro@latest -- --template minimal
5-
```
3+
A minimalist, fast, and elegant blog theme built with [Astro](https://astro.build), [Tailwind CSS](https://tailwindcss.com), and the warm, beautiful [Flexoki](https://stephango.com/flexoki) color palette.
4+
5+
> ✨ Ideal for developers, writers, and creators who value simplicity, performance, and timeless design.
6+
7+
![Astro Flexoki Preview](./public/og-theme-preview.jpg)
68

7-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
8-
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
9-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
9+
---
1010

11-
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
11+
## 🚀 Features
1212

13-
## 🚀 Project Structure
13+
-**Blazing fast** with Astro’s static site generation
14+
- 🎨 **Custom theming** using Flexoki’s harmonious color tokens
15+
- 🌗 **Light/Dark mode** toggle with `data-theme`
16+
- 🧠 **SEO optimized** with dynamic `<meta>` tags and OG support
17+
- ✍️ **Markdown-powered** posts, notes*, and pages
18+
- 📱 Fully **responsive** and mobile-first
19+
- 🔗 Configurable **navigation, social, and footer links**
20+
- 📦 No heavy dependencies — just Astro and Tailwind CSS
21+
- 🖼️ Ready for dynamic **OG image generation** via Astro API (in progress)
1422

15-
Inside of your Astro project, you'll see the following folders and files:
23+
---
1624

17-
```text
18-
/
19-
├── public/
25+
## 🗂️ Folder Structure
26+
27+
```bash
28+
astro-flexoki/
2029
├── src/
21-
│ └── pages/
22-
│ └── index.astro
23-
└── package.json
30+
│ ├── components/ # Reusable UI components (Header, Footer, etc.)
31+
│ ├── content/ # Markdown content for blog, notes, etc.
32+
│ ├── layouts/ # Layouts used by pages
33+
│ ├── pages/ # Routes like /, /about, /articles
34+
│ ├── styles/ # Tailwind and theme styles
35+
├── public/ # Static assets
36+
├── site.config.ts # Global site configuration
37+
├── tailwind.config.ts # Tailwind CSS configuration
38+
```
39+
40+
---
41+
42+
## 🛠️ Getting Started
43+
44+
```bash
45+
# Clone the repo
46+
git clone https://github.com/ak0r/astro-flexoki.git
47+
cd astro-flexoki
48+
49+
# Install dependencies
50+
npm install
51+
52+
# Start the dev server
53+
npm run dev
54+
```
55+
56+
Then visit `http://localhost:4321` in your browser.
57+
58+
---
59+
60+
## ⚙️ Configuration
61+
62+
All your site settings live in `site.config.ts`:
63+
64+
```ts
65+
export const siteConfig = {
66+
title: 'Astro Flexoki',
67+
description: 'A Astro starter template built with TailwindCSS and Flexoki colour pallette',
68+
author: 'John Doe',
69+
url: 'https://example.com',
70+
settings: {
71+
accentColor: 'orange',
72+
postsPerPage: 6,
73+
enableDarkMode: true,
74+
showNewsletterSignup: true,
75+
},
76+
};
2477
```
2578

26-
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
79+
---
80+
81+
## 📸 Screenshots
82+
83+
| Light Theme | Dark Theme |
84+
|-------------|------------|
85+
| ![](./public/screens/light-home.png) | ![](./public/screens/dark-home.png) |
86+
87+
---
88+
89+
## 🔮 Roadmap
90+
91+
- [ ] Update MDX contents
92+
- [ ] Add full-text search
93+
- [ ] Add Projects / Notes content collections
94+
- [ ] OG-image generation
95+
- [ ] CMS integration (Tina, Notion, Contentlayer)
96+
- [ ] RSS feed and sitemap
97+
98+
---
2799

28-
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
100+
## 🙌 Credits
29101

30-
Any static assets, like images, can be placed in the `public/` directory.
102+
- [Astro](https://astro.build) — the static site builder
103+
- [Tailwind CSS](https://tailwindcss.com) — utility-first CSS
104+
- [Steph Ango](https://stephango.com/flexoki) — the color palette
105+
- [Astro Pure](https://github.com/cworld1/astro-theme-pure) — References
31106

32-
## 🧞 Commands
107+
---
33108

34-
All commands are run from the root of the project, from a terminal:
109+
## 📄 License
35110

36-
| Command | Action |
37-
| :------------------------ | :----------------------------------------------- |
38-
| `npm install` | Installs dependencies |
39-
| `npm run dev` | Starts local dev server at `localhost:4321` |
40-
| `npm run build` | Build your production site to `./dist/` |
41-
| `npm run preview` | Preview your build locally, before deploying |
42-
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
43-
| `npm run astro -- --help` | Get help using the Astro CLI |
111+
MIT © [Amit K](https://github.com/ak0r)
112+
Free to use, modify, and share.
44113

45-
## 👀 Want to learn more?
114+
---
46115

47-
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
116+
> Made with 💛 using Astro, Tailwind, and Flexoki.

src/components/blog/SinglePost.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import PageLayout from '@/layouts/PageLayout.astro';
44
import { getFormattedDate } from '@/utils/commonFunctions';
55
import type { CollectionEntry } from 'astro:content';
66
import Container from '@/components/layout/Container.astro';
7-
import RenderMarkdown from './RenderMarkdown.astro';
87
import Badge from '@/components//ui/Badge.astro';
98
import CustomImage from '@/components/ui/CustomImage.astro';
109
import BackButton from '@/components/widgets/BackButton.astro';
@@ -26,7 +25,11 @@ const coverImageAlt = frontmatter.coverImageAlt || title
2625
const pubDate = frontmatter.publishedDate.toISOString()
2726
const isDraft = frontmatter.isDraft
2827
---
29-
<PageLayout>
28+
<PageLayout
29+
title={title}
30+
description={description}
31+
image={coverImage?.src || '/og-default.jpg'}
32+
>
3033
<Container outerClass="max-w-5xl">
3134
<!-- Back button -->
3235
<BackButton

src/components/layout/Footer.astro

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
---
22
import Container from "./Container.astro";
3+
import Link from '@/components/ui/Link.astro';
4+
import { siteConfig } from "@/site.config";
5+
const { footerLinks, settings } = siteConfig;
36
---
47

58
<footer class="w-full border-t border-ui-primary ">
69
<Container outerClass="flex max-w-4xl px-6 py-2 mx-auto w-full">
710
<div class="flex justify-between gap-3 py-8 w-full">
8-
<div class="flex gap-3 text-content-muted">
9-
<a href="/">Privacy Policy</a>
10-
<a href="/">Terms of Service</a>
11+
<div class="flex gap-3 text-content-muted text-sm">
12+
{
13+
footerLinks.map((link) => (
14+
<Link href={link.href}>
15+
{link.title}
16+
</Link>
17+
))
18+
}
1119
</div>
12-
<div class="flex text-sm text-content-muted">© 2025 Umami. All rights reserved.</div>
20+
<div class="flex text-sm text-content-muted">{siteConfig.settings?.copyright}</div>
1321
</div>
1422
</Container>
1523
</footer>

src/components/layout/Header.astro

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,49 @@ import ThemeSwitch from "@/components/widgets/ThemeSwitch.astro";
33
import Container from '@/components/layout/Container.astro';
44
import Link from '@/components/ui/Link.astro';
55
import Button from "@/components/ui/Button.astro"
6+
import { siteConfig } from "@/site.config";
7+
const { siteLogo, nav, settings } = siteConfig;
8+
const currentPath = Astro.url.pathname;
69
---
710

811
<header class="fixed top-0 w-full h-[76px] border-b border-ui-primary z-50 backdrop-blur-lg">
912

1013
<!-- Mobile menu -->
1114
<div id="navMenu" class="fixed bg-base-primary shadow-sm h-full w-full text-xl sm:w-1/2 sm:text-2xl transform transition-transform duration-300 -translate-x-full z-50">
1215
<div class="flex flex-col min-h-screen w-full bg-base-primary">
13-
<div class="">
16+
<div class="items-center justify-center">
1417
<!-- Logo -->
1518
<div class="flex items-center justify-between font-medium px-6 py-2 h-[76px] border-b border-ui-primary">
1619
<a class="flex items-center gap-2" href="/">
17-
<h3 class="font-bold">Umami</h2>
20+
<h3 class="font-bold">{siteConfig.title}</h2>
1821
</a>
19-
<div id="closeBtn" class="">
22+
<div id="closeBtn" class="text-content-primary hover:cursor-pointer">
2023
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" class="size-6">
2124
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
2225
</svg>
2326
</div>
2427
</div>
2528
<!-- Links -->
2629
<div class="flex flex-col gap-3 px-2 py-8">
27-
<Link href="/articles" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/articles' ? 'page' : undefined}>Articles</Link>
28-
<Link href="/tags" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/tags' ? 'page' : undefined}>Tags</Link>
29-
<Link href="/about" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/about' ? 'page' : undefined}>About</Link>
30-
31-
<!-- Subscribe button -->
32-
<Button href="/" variant="primary" class="px-4">
33-
Subscribe Now
34-
</Button>
30+
{
31+
nav.map((item) => (
32+
<Link
33+
href={item.href}
34+
class={`px-4 py-2 text-sm ${
35+
currentPath === item.href
36+
? `text-${settings?.accentColor} font-semibold`
37+
: 'text-content-primary' }`
38+
}
39+
aria-current={Astro.url.pathname === item.href ? 'page' : undefined}>{item.title}</Link>
40+
))
41+
}
3542
</div>
43+
<!-- Subscribe button -->
44+
{settings?.showNewsletterSignup && (
45+
<Button href="/" variant="primary" class="px-4">
46+
Subscribe Now
47+
</Button>
48+
)}
3649
</div>
3750
</div>
3851
</div>
@@ -42,26 +55,31 @@ import Button from "@/components/ui/Button.astro"
4255
<nav class="flex h-full w-full">
4356
<!-- Logo -->
4457
<a class="flex items-center gap-2" href="/">
45-
<h3 class="font-bold">Umami</h2>
58+
<h3 class="font-bold">{siteConfig.title}</h3>
4659
</a>
47-
60+
61+
4862
<!-- Centered Links (only visible on sm and up) -->
4963
<div class="hidden sm:flex flex-1 justify-center items-center gap-4 text-base">
50-
<Link href="/articles" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/articles' ? 'page' : undefined}>Articles</Link>
51-
<Link href="/tags" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/tags' ? 'page' : undefined}>Tags</Link>
52-
<Link href="/about" class="px-4 py-2 text-content-primary" aria-current={Astro.url.pathname === '/about' ? 'page' : undefined}>About</Link>
64+
{
65+
nav.map((item) => (
66+
<Link
67+
href={item.href}
68+
class={`px-4 py-2 text-sm ${
69+
currentPath === item.href
70+
? `text-${settings?.accentColor} font-semibold`
71+
: 'text-content-primary' }`
72+
}
73+
aria-current={Astro.url.pathname === item.href ? 'page' : undefined}>{item.title}</Link>
74+
))
75+
}
5376
</div>
5477

5578
<!-- Right section -->
5679
<div class="flex items-center gap-3 ml-auto">
5780
<!-- Theme Switcher (always visible) -->
5881
<ThemeSwitch />
5982

60-
<!-- Subscribe button (only on sm and up) -->
61-
<!-- <Button href="/" class="ml-4" style="pill">
62-
Subscribe
63-
</Button> -->
64-
6583
<!-- Mobile nav button (only on small screens) -->
6684
<div id="navBtn" class="sm:hidden text-content-primary hover:cursor-pointer">
6785
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" class="size-6">

src/components/ui/Link.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
import { siteConfig } from "@/site.config";
3+
const { settings } = siteConfig;
4+
25
type Props = {
36
href: string;
47
external?: boolean;
@@ -7,7 +10,6 @@ type Props = {
710
class?: string;
811
};
912
10-
1113
const {
1214
href,
1315
external,
@@ -17,6 +19,8 @@ const {
1719
...rest
1820
} = Astro.props;
1921
22+
const themeColor = settings?.accentColor || ''
23+
const hoverColorClass = `hover:text-${themeColor}`;
2024
---
2125

2226
<a
@@ -26,6 +30,7 @@ const {
2630
class:list={[
2731
"block",
2832
className,
33+
hoverColorClass,
2934
group && "group",
3035
]}
3136
{...rest}

src/components/widgets/ScrollToTop.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
<button
55
id="scrollToTopButton"
6-
class="fixed bottom-6 right-6 z-50 rounded-full bg-secondary-bg text-white size-12 flex items-center justify-center shadow-lg opacity-0 pointer-events-none transition-opacity duration-300 hover:opacity-100"
6+
class="fixed bottom-6 right-6 z-50 rounded-full bg-base-muted text-content-primary size-12 flex items-center justify-center shadow-lg opacity-0 cursor-pointer pointer-events-none transition-opacity duration-300 hover:opacity-100"
77
aria-label="Scroll to top"
88
>
9-
<svg class="h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
9+
<svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1010
<path stroke-linecap="round" stroke-linejoin="round" d="M5 15l7-7 7 7" />
1111
</svg>
1212
</button>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
import { Icon } from "astro-icon/components";
3+
import Link from '@/components/ui/Link.astro';
4+
import { siteConfig } from '@/site.config';
5+
const { socials } = siteConfig;
6+
---
7+
<div class="flex items-center gap-6">
8+
{socials.map((link) => (
9+
<Link
10+
href={link.href}
11+
class="text-content-muted hover:text-content-primary hover:scale-120 transition-transform"
12+
rel="noopener noreferrer"
13+
aria-label={`Follow on ${link.name}`}
14+
>
15+
<Icon name={link.icon} class="size-6" />
16+
</Link>
17+
))}
18+
</div>

src/content/articles/elements.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Elements of the Umami Blog Theme"
2+
title: "Elements of the Astro Flexoki blog theme"
33
description: "This page demonstrate some basic elements and typography which you will use frequently within your site."
44
coverImage: "https://picsum.photos/900/600?random=1.webp"
55
publishedDate: 2022-10-01

0 commit comments

Comments
 (0)