---
title: How to edit or add Markdown-based pages locally on your computer
date: 2023-07-27
authors: ['Jake Hirsch', 'Ola Rubaj']
filetype: 'blog'
---

## Intro

In this How to, you will learn how to edit or add Markdown based pages locally on your computer. This offers a range of unique functions, including the ability to automatically link to other pages as well as a simple way to preview the site.

## Prerequisites

- A github account
- A github desktop app
- Obsidian

## Steps

### Step 1: Clone the GitHub repository to your local machine

1.1. Go to https://github.com/ and navigate to the repository you want to clone.
1.2. Click the `<> Code` button, then copy the URL shown under "HTTPS" tab.
1.3. Open GitHub Desktop app.
1.4. Click on "File" in the menu bar, then select "Clone repository...".
1.5. In the popup, select the URL tab and paste the URL you just copied. Then, specify a local path where you want the files to be saved.
1.6. Click Clone.

### Step 2: Open the project in Obsidian

2.1. Open Obsidian.
2.2. If this is your first time using Obsidian, click on "Open folder as vault" on the welcome screen. If you've used Obsidian before, click on "File" -> "Open vault" first.
2.3. Select 'Open folder as vault' and then navigate to the local path where you cloned the GitHub repository, select `/content` folder inside of it, and click "Open". This will open all the markdown files in the repository in Obsidian's file explorer.

### Step 3: Identify the markdown file you want to edit or add

3.1. To edit an existing markdown file: navigate to the file you want to edit, and click it to open.
3.2. To add a new markdown file: click on the "New note" button (pencil icon) in Obsidian's left sidebar, name your file (e.g., `new-page.md`), and press Enter. You might need to move this file to the appropriate directory (pages or posts) later using your file explorer.

### Step 4: Editing or adding content to your markdown file

Some links here on editing on obsidian?

- Another link on markdown formatting?

Optional steps to test locally? I.e. npm install, npm run dev.

### Step 5: Push your changes to the GitHub repository:

5.1 Open your Github desktop app and select 'Add local repository' under 'File'
5.2 Select 'Choose...' and navigate to the folder of the cloned repository and click 'Open
5.3 Write a short summary, explaining the changes you've made
5.4 Press commit to main

### Summary

Congratulations, you've now learned how to edit or add Markdown-based pages locally on your computer!

If anything is not clear to you, or you have suggestions on how we can make this 'How to' better, please don't hesitate to let us know.

Happy editing!
