Skip to content

Commit

Permalink
Add some more instructions for blog posts. (open-telemetry#1714)
Browse files Browse the repository at this point in the history
* Add some more instructions for blog posts.

* Update blog.md
  • Loading branch information
svrnm authored Sep 7, 2022
1 parent 6426d7d commit 558ea35
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,24 @@ file in `/content/en/registry` for your project. You can find a template in

You can submit a blog post either by forking this repository and writting it
locally or by using the GitHub UI. In both cases we ask you to follow the
instructions provided by the [blog post template](archetypes/blog.md)
instructions provided by the [blog post template](archetypes/blog.md).

### Fork & Write locally

Follow the [setup instructions][contributing.md] then, to create a skeletal blog
post, run the following command from the repo root:

```console
$ npx hugo new content/en/blog/2022/file-name-for-your-blog-post.md
$ npx hugo new content/en/blog/2022/short-name-for-your-blog-post/index.md
```

Start editing the markdown file at the path you provided in the previous
command. The file is initialized from the blog-post starter under
[archetypes](archetypes). Once your post is ready, submit it through a [pull
[archetypes](archetypes).

Put assets like images into the folder created.

Once your post is ready, submit it through a [pull
request][pr].

### Using the Github UI
Expand All @@ -48,6 +52,7 @@ request][pr].
`Copy raw content` at the top right of the menu
- [Create a new file](https://github.com/open-telemetry/opentelemetry.io/new/main)
- Paste the content from the template
- Name your file, e.g. `content/en/blog/2022/short-name-for-your-blog-post/index.md`
- Start editing the markdown file
- Once your post is ready click on `Propose changes` at the bottom.

Expand Down Expand Up @@ -107,5 +112,3 @@ already contributed][contributors]!
[google doc]:
https://docs.google.com/document/d/1wW0jLldwXN8Nptq2xmgETGbGn9eWP8fitvD5njM-xZY/edit?usp=sharing
[slack]: https://cloud-native.slack.com/archives/C02UN96HZH6
[blog post template for editing]:
https://github.com/open-telemetry/opentelemetry.io/edit/main/archetypes/blog.md
20 changes: 16 additions & 4 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: {{ replaceRE "[-_]" " " .Name | title }}
linkTitle: ADD A SHORT TITLE HERE # TODO: add short title or remove this line
date: {{ dateFormat "2006-01-02" .Date }}
linkTitle: ADD A SHORT TITLE HERE # Mandatory, make sure that your short title.
date: {{ dateFormat "2006-01-02" .Date }} # Put the current date, we will keep the date updated until your PR is merged
author: >- # If you have only one author, then add the single name on this line in quotes.
[Author1 Name](https://github.com/author1_GH_ID),
[Author1 Name](https://github.com/author1_GH_ID) (Organization Name 1),
...
[AuthorX Name](https://github.com/authorX_GH_ID)
[AuthorX Name](https://github.com/authorX_GH_ID) (Organization Name X)
draft: true # TODO: remove this line once your post is ready to be published
# canonical_url: http://somewhere.else/ # TODO: if this blog post has been posted somewhere else already, uncomment & provide the conancial URL here.
---

## Top-level heading
Expand All @@ -19,6 +20,17 @@ Wrap paragraph text at 80 characters, this helps make git diffs (which is line
based) more useful. If you don't want to bother with that, then just run the
markdown formatter (see below).

## Images

If you use images, make sure that your blog post is located in it's own
directory. Put the images into the same directory.

If you have an image stored at
`content/en/{{ .File.Dir }}imagename.png`,
you can reference them like the following:

![Provide a good image description for improved accessibility](imagename.png)

## Markdown formatter

Before submitting a new commit run the Prettier command over your file:
Expand Down

0 comments on commit 558ea35

Please sign in to comment.