Skip to content

myntsu/myndi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Astro Portfolio & Blog

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.

๐Ÿšฉ Getting started

Are you lost or don't know where to start? Take a look at this simple guide!

  1. Deploy your project ๐Ÿ˜Ž

  2. Update the website to your fit ๐Ÿ˜ค

  3. 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

๐Ÿ† Features

โœ… 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

๐ŸŒ‡ Ligthouse

https://pagespeed.web.dev/analysis/https-myndi-dev/d9he6w1gkn?form_factor=mobile

๐Ÿ“š Project Structure

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/.

๐Ÿ’ป How to get started?

Pick your poison ๐Ÿ˜Ž

  1. Astro template

  2. Clone or fork the repository - forks helps to boost my metrics in GitHub

  3. Do it yourself - simply start a new empty Astro project, and follow the steps below if you want to have the same integrations

1๏ธโƒฃ Astro template

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

2๏ธโƒฃ Clone or fork the repository

Clone or fork the repository

git clone https://github.com/Myntsu/myndi

Change the directory

cd blog-astro

Install the dependencies

npm install

3๏ธโƒฃ Do it yourself

๐Ÿ”’ Dependencies

๐Ÿ›  Installations

๐Ÿ›‘ Please refer to the documentation for a more in depth explanation ๐Ÿ›‘

SaSS and SCSS quick setup

Install

npm install sass

Usage

<style lang="scss">

Astro Image & Sharp quick setup

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',
    }),
  ],
});

Astro Sitemap quick setup

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

Astro Icon quick setup

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

Astro RSS quick setup

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 */

๐Ÿ“– Documentation

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} />

๐Ÿ‘€ Want to know more about Astro?

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

๐Ÿ‘‘ Credits

  • 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

๐Ÿ“„ License

Apache-2.0 license


Made by Myndi - Enjoy ๐Ÿ’™