Code Monkey home page Code Monkey logo

eth's Introduction

Blog of Joao Ferreira

In this repository you will find the source code for joaoavf.com.

This is a fork from Andreas Klinger @ klinger.io.

Techstack

It is a markdown based blog developed with React, Next, Tailwind CSS and TypeScript. The site is statically hosted on Firebase and uses the Realtime Database to capture and display the current views of each blog post.

Getting started

Step 1: Clone repository

git clone [email protected]:andreasklinger/klinger-io.git

Step 2: Install dependencies

pnpm install

Step 3: Start development server

pnpm dev

Deployment

Changes to the "main" branch that are added to the GitHub repository result in an automatic deployment of a static version on Firebase Hosting. Therefore, it is not necessary to update the website manually.

If a circumstance requires manual deployment, perform the following steps:

Step 1: Create production build

pnpm build

Step 2: Deploy via Firebase

pnpm deploy

For this, the Firebase CLI must be installed globally (npm install -g firebase-tools) and it is required that you log in through it (firebase login). Furthermore, you need the necessary project permissions for the deployment.

Add blog post

New blog posts can be added directly via the GitHub website.

Step 1: Open /posts directory

Step 2: Click on "Add file" in upper right corner

Step 3: Open sluggenerator and convert title of post to a slug, which you then use with file extension ".mdx" as filename

Step 4: Insert following header into file and replace placeholders

---
title: 'Title'
publishedAt: 'YYYY-MM-DD'
summary: 'Summary (max. 160 characters)'
---

To make a post stand out, you can add a tag that will be displayed on the overview page. For example: tag: '๐Ÿš€ Popular'

Step 5: Add content as markdown to file

Since it is a .mdx file, React elements (HTML) can be added between the markdown as JSX.

Add image to post

Follow these steps to add a new image to a blog post that is not from an external source. In this way, the image is automatically saved in different quality levels during the building process to reduce network traffic.

Step 1: Add your image to /public/images

Step 2: Use the image as follows

<Image src="your-image.jpg" alt="Your image description" />

The <Image /> component does not need to be imported, but can be inserted directly between the markdown code. It is important to pass only the file name to the src attribute. The path to the /public/images directory is automatically resolved.

eth's People

Contributors

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