maxime1992 / dev-to-git Goto Github PK
View Code? Open in Web Editor NEWPublish a blog post (markdown file) to Dev.to from your command line or from CI with this CLI
License: MIT License
Publish a blog post (markdown file) to Dev.to from your command line or from CI with this CLI
License: MIT License
If images, that were deployed to dev.to already, are updated, the new version is not visible.
I think this is due to caching.
StR:
Go to https://dev.to/maxime1992/manage-your-dev-to-blog-posts-from-a-git-repo-and-use-continuous-deployment-to-auto-publish-update-them-143j and see the image in "2. Create a dev.to token". The image should have been updated with my Pull Request but I am still seeing the old one.
Thinking about how to extend dev-to-git so that it can automatically create an article without the manual step of going to dev.to
dev-to-git create-article "My amazing new blog post"
I've raised #7 to better help with the creation of more complicated CLI commands
basically the way I see this working is
By inserting the id into the frontmatter, this gives us the ability to update the article by simply reading the markdown file to be published.
With latest version (1.4.0
) it's trying to fetch the article first before publishing and if it's a draft but we want to publish the draft returns 404 and then the deploy is blocked.
Using Github Actions instead of Travis (or as an option to choose) would provide for free (and presumably faster) CI workflow with private repos
I'd rather not keep my images in my git repo (cause git is slow with binaries) so I'd like to upload them separately and just link to them.
However, when I do this it tries to translate it to a GitHub link and it breaks. Would be nice to be able to turn this functionality off with a flag.
Is this a cli tool?
If so you should put that in the readme. Mabye even the name!
Great project and thank you for sharing!
This may have been a side effect of moving over to GitHub Actions. It looks like when the release step ran, it only found a README, package.json and LICENSE. Because of this, installing the latest package fails. You might want to make a prerelease
step that runs the same as the build
step so that you can make sure that when release
is fired, it will have the current code.
As this can be used as a mono repo for articles, every time one of them if going to change, they'll all get published.
Thanks to forem/forem#3394 we can now fetch an article and its markdown so we should be able to compare the local markdown with the remote one and skip the update if there's no diff.
EDIT: 2020/12/08 bug fixed, came from dev.to
After following the blog post instructions, I managed to use dev-to-git to upload a test blog post.
I extended to a second blog post, then dev.to broke. I can no longer blog on dev.to nor edit an existing blog post, always getting 404.
I reported the issue to dev.to forem/forem#11690
At this point, one can't tell if the bug is from dev-to-git
, from dev.to
or from the interaction of them = I'm not blaming dev-to-git.
But just in case I suggest NOT using dev-to-git while the linked bug is not fixed, especially if your dev.to blogposts are critical to your business.
I believe that dev.to has a load balancer or something that prevents too many requests from a single host from being fired off too quickly. Both locally and in my CI/CD pipeline, I frequently get these errors. Due to these errors, it sometimes takes executing dev-to-git
multiple times to get my posts updated. I think that a slight delay added between publishing posts could avoid this issue.
[DRAFT] Article "CI Test Success" encountered an error:
Error name: "HTTPError"
Error message: "Response code 429 (Too Many Requests)"
Error stack: "HTTPError: Response code 429 (Too Many Requests)
at EventEmitter.<anonymous> (/Users/devin/code/nx/playground/nxtend-playground/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)"
[PUBLISHED] Article "How to Configure Prettier to Automate Code Formatting" is already up to date
[PUBLISHED] Article "Developing Ionic React Apps in an Nx Workspace with @nxtend/ionic-react" is already up to date
[PUBLISHED] Article "Release @nxtend/ionic-react 2.0.0" is already up to date
[PUBLISHED] Article "@nxtend/ionic-react 2.2.0" encountered an error:
Error name: "HTTPError"
Error message: "Response code 429 (Too Many Requests)"
Error stack: "HTTPError: Response code 429 (Too Many Requests)
at EventEmitter.<anonymous> (/Users/devin/code/nx/playground/nxtend-playground/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)"
[PUBLISHED] Article "Build Cross-Platform Applications in a Monorepo with Nx, Ionic, and Capacitor" is already up to date
[PUBLISHED] Article "Building an Nx Plugin to Add Dependencies to a Project" is already up to date
[PUBLISHED] Article "Creating an ng add Schematic for an Nx Plugin" is already up to date
[PUBLISHED] Article "Executing External Schematics in an Nx Plugin" is already up to date
[PUBLISHED] Article "Extending Schematics in an Nx Plugin" is already up to date
[PUBLISHED] Article "Running Nx Affected Commands in GitHub Actions" is already up to date
[PUBLISHED] Article "Nx Brings High-Quality CLI Tooling to React" is already up to date
I had a "bad" cover_image: foo.jpg
and dev.to won't let you update your content with a "bad" cover_image so I got an error...
but the error was not very helpful π
only after deleting all the content and each front matter entry line by line did I found out what the issue was π
can we improve the error message? π
[DRAFT] Article "Introducing: Modern Web" encountered an error:
Error name: "HTTPError"
Error message: "Response code 422 (Unprocessable Entity)"
Error stack: "HTTPError: Response code 422 (Unprocessable Entity)
at EventEmitter.<anonymous> (/html/web/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)"
For out dev.to/rxjs (https://github.com/rxjs-blog/blog) organization I would like to have one central repository, where everyone can file prs to publish his article within the org. Therefore I would appreciate supporting authors on blog article level and not having one central dev.to user configured in the travis pipeline. I don't if that is even feasible?
Many thanks for maintaining this project. It helped me a lot with setting up the blogs!
master
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can resolve this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
package.json
file.A package.json file at the root of your project is required to release on npm.
Please follow the npm guideline to create a valid package.json
file.
Good luck with your project β¨
Your semantic-release bot π¦π
If an article has an empty body, it should be able to update (which is not the case)
Error name: "Error"
Error message: ""
Error stack: "Error
at Article.<anonymous> (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:11180:39)
at step (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:77:27)
at Object.next (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:58:57)
at fulfilled (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:48:62)
at processTicksAndRejections (internal/process/task_queues.js:89:5)"
To repro:
yarn run dev-to-git --dev-to-token YOUR-TOKEN
I'm still trying to use dev-to-git, hoping a successful upload could fix my dev.to account?
I'm getting 422 (Unprocessable Entity)
No idea what is wrong.
Seeing #27 I checked my cover image = I don't have one.
Also checked links to all images.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.