This repository contains code and content for the libp2p Blog & News website.
It's recommend that you add your blog entry manually by creating a new Markdown file and creating a pull request. This allows us to review blog posts line by line and go through a proper review cycle.
The steps are as follows:
- Add your new file in
src/_blog
- Add any images or assets in
src/assets
- Add the path to your Markdown file in a new line in the file
.forestry/front_matter/templates/blog-post.yml
When writing a new post, you'll also need to fill in the header information:
---
tags:
- <any tags you want i.e. libp2p>
- libp2p
title: <title of your blog post>
description: <short description; this field is optional>
date: <the date you would like to publish the blog post, can be in the future>
permalink: <set as '' unless you want a specific permalink>
translationKey: <set as ''>
header_image: <the header image for the blog post. The file should be in src/assets and it should be added here as /filename.jpg>
author: <Your Name>
---
Here is an example pull request that adds a new blog entry for reference: https://github.com/libp2p/blog/pull/33/files
This site is built in Vuepress, and uses Vue/JavaScript for functional code and Markdown for post content.
To build a local copy, run the following:
-
Clone this repository:
git clone https://github.com/libp2p/blog.git
-
Move into the
blog
folder and install the npm dependencies:cd blog npm install
-
Start the application in dev mode:
npm ci NODE_OPTIONS=--openssl-legacy-provider npm start
-
Open localhost:8080 in your browser.
You can close the local server with CTRL
+ c
. To restart the local server, run npm start
from inside the blog
directory.
Once you're happy with your local changes, please make a PR against the main
branch. Including detailed notes on your PR - particularly screenshots to depict any changes in UI - will help speed up approval and deployment.
All PRs against main
automatically generate Fleek previews to make it easier to "check your work". You can view your PR's preview by clicking Details
in the fleek/build
check at the bottom of your PR page:
A reviewer will be by shortly to have a look!
This site's codebase is under active maintenance by members of the core libp2p team.
© Protocol Labs | Code is licensed with the MIT License. Except as noted, other content licensed CC-BY 3.0.