Hashnode recently released Devblog – a tool that lets you set up your own developer blog on your own domain within minutes.

Hashnode最近发布了Devblog,该工具可让您在几分钟内在自己的域上建立自己的开发人员博客。

In case your wondering, I am not sponsored by Hashnode. They don't even know I'm writing this article. I'm just incredibly impressed with their Devblog tools, and I thought I'd share them with you.

如果您想知道,我不是由Hashnode赞助的。 他们甚至不知道我在写这篇文章。 他们的Devblog工具给我留下了难以置信的印象,我想与您分享它们。

First of all, you may be asking: why not just use Medium or some other open publishing platform?

首先,您可能会问:为什么不仅仅使用Medium或其他开放式发布平台?

Well, here are some major reasons Devblog is better for developers.

好吧,这是Devblog对开发人员更好的一些主要原因。

原因1:您可以在自己的域上托管Devblog。 (Reason #1: You can host your Devblog on your own domain.)

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
I published this article on my Devblog and now it's available on my own personal website's subdomain.
我在Devblog上发布了这篇文章,现在可以在我自己的个人网站的子域中找到它。

This is a big deal if you want to build up your own blog's SEO over a longer time horizon.

如果您想在更长的时间范围内建立自己的博客的SEO,这是一件大事。

This also saves you from becoming dependent on blogging platforms that have a nasty tendency to throw up ads or popups on your articles (or even put paywalls / sign-in walls in front of your blog posts).

这也使您不必依赖博客平台,后者倾向于在您的文章上投放广告或弹出式窗口(甚至在博客文章的前面放置付费墙/登录墙)。

I mean sure – you could always just migrate your articles later when these platforms get too spammy. But migrating can be a huge hassle. (And yes - I speak from experience.)

我的意思是肯定–当这些平台变得过于垃圾邮件时,您总是可以稍后再迁移您的文章。 但是迁移可能是一个巨大的麻烦。 (是的-我是根据经验讲的。)

"Possession is nine tenths of the law." – One prominent Silicon Valley intellectual property lawyer I talked to
“占有是法律的十分之一。” –我与一位著名的硅谷知识产权律师交谈

原因2:Devblog在设计时就考虑了开发人员。 (Reason #2: Devblog is designed with developers in mind.)

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
A preview of Hashnode's Python Syntax highlighting on my Devblog article
我的Devblog文章上Hashnode的Python语法突出显示的预览

You can type using markdown. And your code snippets get syntax highlighting, too.

您可以使用markdown进行输入。 您的代码段也将突出显示语法。

Any images you upload get cached in Hashnode's CDN for speed, so you're not hot-linking or relying on CDNs that might be blocked in some countries (like Google's or Facebook's).

您上传的所有图像都会被缓存在Hashnode的CDN中以提高速度,因此您不会热链接或依赖在某些国家(例如Google或Facebook的国家)可能被阻止的CDN。

原因#3:Hashnode将在整个网络中分发您的文章,以便您获得更多读者 (Reason #3: Hashnode will distribute your article throughout its network so you can get more readership)

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
My Devblog article showing up in Hashnode's global algorithmic newsfeed
我的Devblog文章出现在Hashnode的全局算法新闻提要中

Many of Hashnode's authors are blogging on their own personal domains. But their articles still automatically show up on Hashnode's website in its algorithmic newsfeeds.

Hashnode的许多作者都在自己的个人域中撰写博客。 但是他们的文章仍然会通过算法新闻源自动显示在Hashnode的网站上。

This means your blog will start with a baseline audience that you can grow from there.

这意味着您的博客将以基准受众为起点,您可以从那里开始成长。

Devblog更好的其他原因: (Other reasons Devblog is better:)

  • You own your own data.

    您拥有自己的数据。
  • You can customize your Devblog way more than most other blogging websites allow.

    您可以自定义Devblog的方式超出大多数其他博客网站所允许的范围。
  • Devblog is free. You don't even need to pay for your own server or serverless function calls.

    Devblog是免费的。 您甚至不需要为自己的服务器或无服务器功能调用付费。
  • Devblog automatically creates an SSL certificate for you and keeps it updated for you.

    Devblog会自动为您创建一个SSL证书并为您更新。

好的–那么如何设置Devblog? (OK – so how do I set up a Devblog?)

The good news is it's pretty simple. You can create the blog by going to https://hashnode.com/devblog and signing in.

好消息是这很简单。 您可以通过转到https://hashnode.com/devblog并登录来创建博客。

You just need to choose a name and you're good to go. Then you can come back to compose your first article after you've configured your domain.

您只需要选择一个名称就可以了。 配置完域后,您可以返回撰写第一篇文章。

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
The Devblog creation flow
Devblog创建流程

Your Devblog will immediately get a hashnode.dev subdomain.

您的Devblog将立即获得hashnode.dev子域。

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
What you see after you've created your Devblog and before you've configured it.
在创建Devblog之后和配置它之前,您会看到什么。

After you create your Devblog you'll see a screen like this. Enter your domain name (with your subdomain if you're using one) and click "update". Then click "Access Dashboard" to configure it.

创建Devblog后,您会看到一个类似的屏幕。 输入您的域名(如果使用的话,请输入您的子域),然后单击“更新”。 然后单击“访问仪表板”进行配置。

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客

There are a ton of ways you can customize your Devblog. But today we're just going to focus on getting it live on your own domain.

您可以通过多种方式自定义Devblog。 但是今天,我们将专注于将其发布到您自己的域中。

Hashnode recommends using a subdomain for this so that you can get access to their global CDN and edge caching, so that's what we're going to do in this tutorial.

Hashnode建议为此使用子域,以便您可以访问其全局CDN和边缘缓存,因此这是我们在本教程中将要做的。

If you haven't already bought a domain, you can do so. I recommend choosing a domain name where you can buy the same name for .com, .org, and .net, since those are the "big 3" original top-level domains that have existed since the 1990s. (Before the great TLD cash-grab.)

如果您尚未购买域名,则可以购买。 我建议选择一个域名,您可以在其中购买.com,.org和.net的相同名称,因为这些域名是1990年代以来就存在的“三大”原始顶级域名。 (在获得顶级TLD现金之前)。

You only need to configure your Devblog for one of your domains. You can then redirect your other domains over to it.

您只需要为您的一个域配置Devblog。 然后,您可以将其他域重定向到该域。

Here is how you should configure your DNS. Note that this is NameCheap's DNS dashboard, but most dashboards will look similar, and all will have a CNAME option:

这是配置DNS的方法。 请注意,这是NameCheap的DNS仪表盘,但是大多数仪表盘看起来都相似,并且所有仪表盘都有CNAME选项:

Devblog:如何在几分钟内在自己的域上启动自己的开发人员博客
A picture of my personal domain name dashboard on Namecheap. The blog subdomain is pointed to my Devblog and the www and root domains redirect to my personal Twitter account.
我在Namecheap上的个人域名信息中心的图片。 Blog子域指向我的Devblog,而www和根域重定向到我的个人Twitter帐户。

Create a CNAME record and set the host to whatever you want your subdomain to be (I chose blog).

创建一个CNAME记录,并将主机设置为您想要的子域(我选择blog )。

Then set its value to hashnode.network

然后将其值设置为hashnode.network

Hashnode will handle issuing your SSL certificate for you, so you'll automatically get a nice https at the front of your blog's URL. ????

Hashnode将为您处理您的SSL证书的发布,因此您会在博客URL的前面自动获得一个漂亮的https 。 ????

I set the TTL to 1 minute so it would refresh faster but you may not have to do this.

我将TTL设置为1分钟,因此刷新速度更快,但是您不必这样做。

Presto. You can go to https://[your subdomain].[your domain].[your TLD] and see your Devblog.

Presto。 您可以转到https://[your subdomain].[your domain].[your TLD]然后查看您的Devblog。

For example, my Devblog is at https://blog.quincylarson.com.

例如,我的Devblog位于https://blog.quincylarson.com

你完成了。 (You're done.)

I told you it was fast.

我告诉你那太快了。

Now you can use Hashnode's markdown editor to create your first blog post.

现在,您可以使用Hashnode的markdown编辑器来创建您的第一篇博客文章。

Happy blogging.

快乐的博客。

翻译自: https://www.freecodecamp.org/news/devblog-launch-your-developer-blog-own-domain/

相关文章: