Skip to content

Commit 15b160e

Browse files
authored
docs: remove dev.to cover_image param. updated description
1 parent c762915 commit 15b160e

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
[![CI](https://github.com/protiumx/blogpub/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/protiumx/blogpub/actions/workflows/ci.yml)
44

5-
Github action to publish your blog articles to [Medium](https://medium.com/) or [Dev.to](http://dev.to/).
6-
It gets the files from a `push` event and process the first `md` file that find.
7-
**The file is ignored if it already existed before the push event.**
8-
This avoid publishing again when making fixes on an existing article.
5+
Github action to publish your blog articles to [Medium](https://medium.com/) or [Dev.to](http://dev.to/) using their respective REST APIs.
6+
The action searches for markdown files in the commit of the `push` event and uses **first** `md` file that finds.
7+
8+
## Updating articles
9+
10+
Currently it's not supported to update the articles on the different platforms.
11+
If the markdown file found in the `push` event **already** exists on the commit **before**, the action will **skip it**.
12+
This avoids publishing the article again.
913

1014
## Pre-requisites
1115

@@ -14,7 +18,6 @@ In order to interact with both platforms API's you will need:
1418
- **Dev.to** [API Key](https://developers.forem.com/api#section/Authentication)
1519
- [Github access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with `reading` permissions
1620

17-
1821
## Usage
1922

2023
The action will grab an `markdown` file from a push event to a branch.
@@ -30,8 +33,7 @@ on:
3033
- 'articles/*'
3134
```
3235
33-
**Note**: we only want to trigger this action when files are added to the folder
34-
`blogs`.
36+
**Note**: we only want to trigger this action when files are added to the `articles` folder.
3537

3638
You can define your job as follows:
3739
```yml
@@ -51,7 +53,8 @@ jobs:
5153
medium_user_id: 1f3b633f149233c057af77f0016a9421fa520b9a59f97f5bd07201c2ca2a4a6bc
5254
5355
```
54-
Check [blogpub-test](https://github.com/protiumx/blogpub-test) for more examples or my personal [blog](https://github.com/protiumx/blogpub-test) source
56+
Check my personal [blog](https://github.com/protiumx/blog) source as example of usage
57+
5558
## Inputs
5659

5760
- `gh_token`: Github token. **Required**
@@ -98,7 +101,6 @@ The following arguments can be set:
98101
- `tags`: `[string | string[]]` Comma separated tags or yaml list. Note: Medium allows up to 5 tags whereas Dev.to only 4.
99102
- `license`: `[string]` Medium license type. Refer to [Medium API Docs](https://github.com/Medium/medium-api-docs#33-posts). **Default**: `public-domain`
100103
- `published`: `[boolean]`. **Default**: `true`
101-
- `cover_image`: `[string]` Dev.to cover image
102104

103105
## Template Support
104106

@@ -119,9 +121,8 @@ This is only for Medium
119121

120122
## Relative Paths
121123

122-
To use any media contained in your repository you can use relative paths.
123-
All relative paths will be resolved using the raw url of the markdown down file that
124-
is being processed.
124+
You can use relative paths to use any media files hosted in the same repository as the article files.
125+
All relative paths will be resolved using the **github raw content** URL.
125126

126127
Example:
127128
```
@@ -156,12 +157,9 @@ If you want to test the action locally you could clone `blogpub-test` and use
156157

157158
Please submit a PR with any contribution. Refer to the list of `TODO's` or open issues.
158159

159-
160160
## TODO
161161

162162
- [x] Relative paths to github raw server
163-
- [x] Support `cover_image` for dev.to API with relative path
164-
- [ ] Test action with custom `medium` base url.
165163
- [ ] Remove `axios` in favor of node's `https`
166164
- [ ] Sanitize inputs
167165
- [ ] Support publishing to only 1 platform

0 commit comments

Comments
 (0)