Git Product home page Git Product logo

home's Introduction

🌐 Alejandro's personal space

Built with Astro

CI & CD workflow status

My own space on the web, featuring blog posts and personal highlights.

This repository contains the source code for my personal website. Its design follows the Jamstack architecture, which can be easily deployed to any web server requiring next to no server configuration.

At the heart of this architecture is Astro, a modern, component-based static site generator built with extensibility and performance in mind: Astro does not send any runtime JavaScript to web browsers by default, and runs entirely at build-time.

Each commit triggers a continuous integration and deployment process powered by GitHub Actions workflows, which statically analyzes the source, builds the site, runs Lighthouse CI on it, and deploys the result to Cloudflare Pages edge servers.

Giscus is used as a database-less comments system backed up by the GitHub Discussions of this repository.

graph
    subgraph Developer
        Change[New post, site or source change] --> Commit[<pre>git commit</pre> & <pre>git push</pre>]
    end

    Commit --> GHRepo["GitHub repository<br>(with Giscus GitHub Discussions integration)"]
    GHRepo --> Checkout

    subgraph GitHub Actions CI & CD workflow
        Checkout -->
        Install[Install dependencies: <pre>npm ci</pre>] -->
        Format[Run Prettier: <pre>npm run format</pre>]-- No formatting issues are found -->
        Lint[Run ESLint: <pre>npm run lint</pre>]-- No lints are found -->
        Build[Build: <pre>npm run build</pre>]-- Astro and its integrations run in SSG mode<br/>to build a static site bundle -->
        LighthouseCI[Run Lighthouse CI]-- Quality assertions pass -->
        Deploy[Deploy to Cloudflare Pages]
    end

    Deploy --> CFPages[Cloudflare edge servers]

    subgraph End user
        Client[Web browser]
    end

    Client-- Visits deployed website at --> CFPages
    Client-- Retrieves blog post comments from --> GHRepo
Loading

✨ Highlights

  • Automatic RSS feed generation on build time, allowing people and computers to consume blog posts from news reader applications.
  • Written entirely in TypeScript, improving developer experience and code safety.
  • Strict CI workflow to ensure code quality and end-user website performance, using Prettier, ESLint with additional accessibility lints, and Lighthouse CI.
  • Follows good SEO practices: automatically generates a robots.txt file, sitemap and web manifest. Each page contains <meta> tags that describe it in a machine-parsable way.
  • Observes the Open Graph protocol, which enables beautiful link previews with custom images.
  • Each blog post is associated an Open Graph image that is procedurally generated from its title and description.
  • Images may be encoded in multiple formats and resized to fit different client viewport sizes, minimizing the bandwidth required to display them while allowing fallbacks to less efficient arrangements.
  • Critical CSS styles are automatically inlined for better loading times with Critters.
  • Custom, refreshing analogous color scheme that defies the usual light-dark dichotomy, implemented with Tailwind CSS.
  • Client-side blog post search powered by Pagefind.

πŸ“₯ Getting started

The development workflow should be unsurprising to anyone acquaintanced with the npm ecosystem. After cloning the repository, run the following commands to get this website up and running in a local development server:

npm install
npm run dev

I recommend using editors like Visual Studio Code for modifying the source because they provide a better experience: this repository contains settings files for VS Code that will prompt you to set it up as intended. However, you are free to use any other editor you like.

After making some changes you can run npm run format:fix and npm run lint:fix to correct formatting and static analysis lints, respectively. When ready, you can also execute npm run build to generate a production site bundle at the dist directory.

πŸ“ Project structure

This project distributes its source artifacts across folders as follows:

/
β”œβ”€β”€ public
β”‚Β Β  β”œβ”€β”€ giscus: styles for the Giscus widget used for post comments.
β”‚Β Β  └── rss: XSLT stylesheet to beautifully display the site RSS feed on user agents with no RSS feed functionality.
└── src
    β”œβ”€β”€ components: miscellaneous components used in the site pages.
    β”œβ”€β”€ content
    β”‚Β Β  └── blog: blog posts, in Markdown (.md) or MDX (.mdx).
    β”œβ”€β”€ images
    β”‚Β Β  └── landscape-parallax: images for the animated landscape parallax component.
    β”œβ”€β”€ layouts: the layouts used for the generated pages.
    └── pages
        β”œβ”€β”€ blog
        β”‚Β Β  └── post: route for rendering blog posts.
        β”œβ”€β”€ rss: page to generate the site blog posts RSS feed.
        └── thumbs: page to procedurally generated Open Graph thumbnail images for each blog post.

βš–οΈ License

GPLv3 Β© Alejandro GonzΓ‘lez

home's People

Contributors

alextmjugador avatar nikolarhristov avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.