Portfolio & blog template, sit down and order yours for free (๏ฝ๏ฟฃโฝ๏ฟฃ)๏ฝ
Hey there, my nickname is Myndi. I'm a front-end developer.
Passionate about designing, wanting to give back to people starting on this journey ๐ฅฐ
This project is a highly costumizable Portfolio & Blog.
Are you lost or don't know where to start? Take a look at this simple guide!
-
Deploy your project ๐
-
Update the website to your fit ๐ค
-
Delete this
.md
and make your own to sail ๐
Landmarks | Explanation |
---|---|
Features | What the project has to offer |
Metrics | Lighthouse statistics for most of the views |
Structure | List of the folders you will find here |
Setup | How to get started to get your own site |
Documentation | Where to look to start editing it |
Learn | Want to know more? Check this curated list |
Credits | A special thanks to everyone who contributed |
โ
Vanguardist layout
โ
Simple colors, intuitive design
โ
Responsive
โ
Mobile Friendly
โ
Accessible, hyperlegible font
โ
Type-safe Markdown
โ
Super fast loading
โ
Draft posts, pagination, related posts, categories, author
โ
Sitemap & RSS
โ
Mostly best practices
โ
Customizable
โ
Light/Dark mode
โ Fuzzy search
โ Boring portfolio/blog
This project has the following folder structure:
/
โโโ public/
โ โโโ fonts/
| | โโโ atkinson-hyperlegible
โ โโโ images/
โ โโโ rss/
| | โโโ styles.xsl
โ โโโ favicon.svg
โ โโโ robots.txt
โโโ src/
โ โโโ assets/
| | โโโ 404.jpg
โ โโโ components/
| | โโโ about/
| | | โโโ AboutMe.astro
| | | โโโ Hobbies.astro
| | | โโโ Projects.astro
| | | โโโ Technologies.astro
| | โโโ utility/
| | | โโโ AuthorLinkAndDate.astro
| | | โโโ BackgroundNoise.astro
| | | โโโ CardsContainer.astro
| | | โโโ Link.astro
| | | โโโ SocialMedia.astro
| | โโโ CategoryCloud.astro
| | โโโ Footer.astro
| | โโโ Nav.astro
| | โโโ Pagination.astro
| | โโโ PostCard.astro
| | โโโ PostHeader.astro
| | โโโ RelatedPosts.astro
| | โโโ SEO.astro
โ โโโ css/
| | โโโ blogpost.scss
| | โโโ global.scss
โ โโโ data/
| | โโโ siteData.json
โ โโโ layouts/
| | โโโ BlogPostLayout.astro
| | โโโ MainHead.astro
| | โโโ MainLayout.astro
โ โโโ pages/
| | โโโ author/
| | โโโ blog/
| | โโโ category/
| | โโโ 404.astro
| | โโโ about.astro
| | โโโ index.astro
| | โโโ rss.xml.js
โ โโโ scripts/
| | โโโ copyright.js
| | โโโ jsonLD.js
| | โโโ nava.js
| | โโโ postcard.js
| | โโโ projects.js
| | โโโ scrollspy.js
| | โโโ technologies.js
| | โโโ themechange.js
| | โโโ utils.js
| โโโ env.d.ts
โโโ .gitignore
โโโ astro.config.mjs
โโโ config.js
โโโ LICENSE
โโโ package-lock.json
โโโ package.json
โโโ READ.ME
โโโ ts.config.json
Astro renders .astro
, .md
or .mdx
files inside src/pages/
as a regular .html
page.
All the statics assets, like fonts, images, etc., must be placed inside public/
.
Pick your poison ๐
-
Clone or fork the repository - forks helps to boost my metrics in GitHub
-
Do it yourself - simply start a new empty Astro project, and follow the steps below if you want to have the same integrations
Run this command locally and let the magic happen
# npm 6.x
npm create astro@latest --template Myntsu/myndi
# npm 7+
npm create astro@latest -- --template Myntsu/myndi
#pnpm
pnpm create astro@latest --template Myntsu/myndi
# yarn
yarn create astro --template Myntsu/myndi
Clone or fork the repository
git clone https://github.com/Myntsu/myndi
Change the directory
cd blog-astro
Install the dependencies
npm install
๐ Please refer to the documentation for a more in depth explanation ๐
Install
npm install sass
Usage
<style lang="scss">
Note: Astro 3.0 comes with this dependency built-in by default, no need to install again.
Install
npm install @astrojs/image
npm install sharp
Update astro.config.*
import image from '@astrojs/image';
Add to astro.config.*
export default defineConfig({
integrations: [
image({
serviceEntryPoint: '@astrojs/image/sharp',
}),
],
});
Install
npm install @astrojs/sitemap
Add to astro.config.*
import sitemap from '@astrojs/sitemap';
Update astro.config.*
export default defineConfig({
site: "https://<YOUR SITE>",
integrations: [
sitemap(),
image({
serviceEntryPoint: "@astrojs/image/sharp",
}),
],
});
Add to <head>
<link rel="sitemap" href="/sitemap-index.xml" />
Add to robots.txt
Sitemap: https://<YOUR SITE>/sitemap-index.xml
Install
npm i astro-icon
Usage
---
import { Icon } from 'astro-icon'
---
<!-- Automatically fetches and inlines Material Design Icon's "account" SVG -->
<Icon pack="mdi" name="account" />
<!-- Equivalent shorthand -->
<Icon name="mdi:account" />
Note: to obtain the icons visit Icรดnes
Install
npm install @astrojs/rss
Create at the root of /pages
rss.xml.js
Add to rss.xml.js
import rss from '@astrojs/rss';
import { formatBlogPosts } from "../scripts/utils"
const postImportResult = import.meta.glob('./blog/**/*.md', { eager: true });
const posts = formatBlogPosts(Object.values(postImportResult));
export const get = () => rss({
stylesheet: '/rss/styles.xsl',
title: 'My Astro Blog',
description: 'A humble Astronautโs guide to the stars',
site: import.meta.env.SITE,
items: posts.map((post) => ({
link: post.url,
title: post.frontmatter.title,
pubDate: post.frontmatter.date,
description: post.frontmatter.description,
customData: `
<author>${post.frontmatter.author}</author>
`
}))
});
Create a styles.xsl files at /public/rss
/* Here you add your XSL styles */
/* If you don't have any, grab the ones from this repository */
The main files will be astro.config.mjs
and config.js
inside your root
folder, the rest would be inside your /src/
.
๐ต astro.config.mjs
to edit your site's URL.
site: "https://yoursite.com",
๐ต config.mjs
to edit main key points of the site.
// links
{ label: "About me", href: "#About-Me" }
// socials
{ platform: "facebook", link: "www.facebook.com", handle: "User" }
๐ต /src/pages/blog/
to create a new blog post.
Note: each post should have the .md as file extension.
---
layout: "../../layouts/BlogPostLayout.astro"
title: A title
date: 01January2023
author: Author
image: {
src: "https//your-image.com",
alt: "Your image",
}
description: Description.
draft: true/false
category: Category
profile: {
source: "/images/avatar/avatar.png",
altText: "Author profile picture",
}
---
Blog here.
๐ต /src/pages/category/[category].astro
to add a new category to your blog posts.
{
params: { category: slugify("Category") },
props: { name: "Category" },
}
๐ต /src/data/siteData.json
to set the default's meta data for each post.
{
"title": "My Astro Page",
"description": "My musings about the Astro framework",
"image": {
"src": "/images/avatar/avatar.png",
"alt": "My Astro Page"
}
}
๐ต /src/components/Seo.astro
and /src/pages/rss.xml.js
to edit the social media embeds.
// /src/components/Seo.astro
<meta property="og:site_name" content="My Astro Page" />
// /src/pages/rss.xml.js
title: 'My Astro Page',
description: 'A humble Astronautโs guide to the stars',
Note: make sure you don't mess up with anything else in there since it's passed dynamically.
๐ต /src/css/global.scss
to edit the global variables.
:root {
// main tag
--container-width: 100%;
--container-max-width: 900px;
--current-font-size: 1rem;
--icon-font-size: calc(var(--current-font-size, 0.75rem) * 0.75);
// sizing
--rem-xs: 0.25rem;
--rem-sm: 0.5rem;
--rem-md: 0.75rem;
--rem-lg: 1rem;
--rem-xl: 1.5rem;
// colors
--main-color: 240 90% 80%;
--background: 0 0% 9%;
--background-lighter: 0 0% 11%;
// font and link styles
--font: 0 0% 91%;
--font-dark: 0 0% 9%;
--link: hsl(var(--main-color) / 0.2);
// button an tag styles
--button: 240 100% 65%;
--button-font: 0 0% 100%;
--tag: 0 60% 50%;
--tag-font: 0 0% 100%;
}
๐ต To use utility components do the following:
-
Links
import Link from "/components/simple/Link.astro"; <Link href="www.site.com" target="blank" external> Content here </Link>
-
Cards container
import CardsContainer from "/components/simple/CardsContainer.astro"; <CardsContainer> Content here </CardsContainer>
-
Images
// width and height are required import { Image } from 'astro:assets' <Image src="/images/your-image.jpg" alt="Image alt" width={150} height={150} format="webp" quality={100} class="your-class" />
-
Icons
// refer https://icones.js.org/ for icon names import { Icon } from "astro-icon"; <Icon class="your class" name="name:icon-name"/>
-
Social media links
import SocialMedia from "/simple/SocialMedia.astro"; <SocialMedia class="filled" socials={config.socials} />
Check these amazing people (or articles)!
- Astro Documentation - the official Astro documentation, user friendly, somewhat hard to follow
- Coding in Public - advanced Astro development, user friendly, very easy to follow
- Kevin Powell - introductory Astro development, very user friendly, very easy to follow
- CodingInPublic [YouTube] - for the amazing tutorial to create an Astro Blog and further more
- Brayan Diaz C [Github] - for his help reviewing the READ.ME, templates and release on GitHub
- Kevin Powell [Discord/YouTube] - for helping me realize the tag wasn't using the proper initial-scale
- Zakum [Discord] - for helping me fixing the navbar layout not sticking properly
- ChatGPT - for the really good insights on parts of my code (it really helped me here and there)
- Mannix [Discord] - for helping me fixing the sidebar inside blog posts not sticking
Apache-2.0 license
Made by Myndi - Enjoy ๐