• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ipfs-inactive/blog: [ARCHIVED] Source for the IPFS Blog

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ipfs-inactive/blog

开源软件地址:

https://github.com/ipfs-inactive/blog

开源编程语言:

CSS 47.8%

开源软件介绍:

THIS REPOSITORY IS BEING DEPRECATED

Heads up! On 8 April 2021, this repository will be deprecated and replaced with ipfs/ipfs-blog. This repository will not be receiving any updates. It is here for historical purposes.


IPFS Blog

Source for the IPFS Blog

ipfs-blog @ 2018-11-30

Usage

The IPFS blog is a static website, built with hugo. We use node, npm, less, and a few other helpful modules to optimize the site for deployment.

With make, node and npm installed on your system, you can:

Run the site in dev mode

$ make dev
...

Web Server is available at http://localhost:1313/

The first time you run it, it will install all the dependencies , Then it will watch for changes in the source code and rebuild the site when you save your changes.

Run it and open http://localhost:1313/ in your browser, and start editing your new blog post.

Note: In dev mode, you will see all posts, even ones where you set the date field to be in the future, say to schedule a post for a specific date. Posts with a date value in the future will not appear on the live site until that date arrives. There is a nightly CI job that runs at 00:00 UTC that will cause posts that are merged to master to go live on the date you set.

Build the production site

$ make

...

Site built out to ./public dir

This will build out the static site, optimized and ready for deployment, to the ./public directory.

Create a new blog post

Each blog post is a markdown file, with a little metadata at the top (known as YAML front matter) to help us create the post index page.

A blog post looks like this:

---
date: 2019-01-24
title: 2018 Q4 London Hack Week Summary
author: David Dias
---

Back in October last year, the Go Core Dev Team for the IPFS, IPLD, and libp2p projects spent some quality time together.

...

To create your new post find the last post in content/post, create a copy, and change the file name by incrementing the number in the title, and change the name to be a useful URL slug for your post. e.g.

$ cd content/post
$ cp 66-london-hack-week-report.md 67-incredible-adventures.md

Now edit the metadata at the top of the file.

  • date - the "published at" date, shown on the blog index page, please update at posting time to reflect current date - required (posts will not be displayed until this date on the live blog, but you will see them locally when using make dev)
  • author - used to give you credit for your words - required
  • title - used as the h1 on the post-page, and the name of the post on the index page. required
  • tags - don't appear to be used right now, but set them anyway as we'll want to add a see more posts like this one feature one day.
  • url - can be used to override the post URL if needed. Please start and end URLs with a / (/my/url/).
  • header_image - name of the image displayed on the blog homepage. If no image is set, a default header image is shown. See Custom header image for more details.
  • snippet - the short string of text that is displayed for each post on the blog homepage. If no snippet is set, the first ~20 words are shown.

We have a process for creating and reviewing content before it gets published. Please review PIPELINE.md for the details.

Custom header image

Each post can have a custom image that is shown on the blog homepage. To set an image:

  1. Create the image you want to use and crop it to 500px by 250px.

  2. Move the image into static\header_images.

  3. Rename the image to match the file name of your post. For example, the 085-announcing-rust-ipfs.md post uses 085-announcing-rust-ipfs.png as the header.

  4. In the post markdown, edit the front-matter to include the header_image variable:

    header_image: 085-announcing-rust-ipfs.png
  5. Push your changes.

Editing

Submit a Github PR with your changes, and request a review.

  1. Make a change to a file
  2. Add and commit.
  3. Push to a remote branch.
  4. Make a pull request to master.
  5. Request a review from another member of the IPFS org.

Publishing

CircleCI builds the static site, Pins it to our IPFS Cluster, and provides a preview link for a review on the Gateway. Merges to to master do the same steps plus update the DNSLink for the domain.

In order for CircleCI to build the site after your merge, you must be a member of the website-deployers, comms, GUI or admin teams on the IPFS GitHub org and you must subscribe to the CircleCI builds for the ipfs/blog repository. Create a free CircleCI account, and then subscribe to the repo here.

After the CircleCI build completes, it will take a few minutes for the DNS update to propagate and your changes to show up on the website.

Translating


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
miaoski/ipfs-tutorial: IPFS 筆記和教學 (繁體中文)发布时间:2022-06-22
下一篇:
victorb/ipfscrape: Scrape pages and store them in IPFS发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap