Releases: maelvls/hudevto
0.3.0
Changes since 0.2.0
- Hugo upgraded to v0.147.7: I've bumped
hudevtoto use Hugo v0.147.7. That's because I could no longer runhudevtodue to lots of Hugo-related deprecations. - --root now works: turns out
--roothad never been working properly. I fixed that in this release. - index.md articles now supported: Articles that use the layout
content/article-name/index.mdnow display correctly in the log messages. For example, instead of showing as:(which isn't clickable in iTerm2 since the file doesn't exist), they now show as:content/article-namecontent/article-name/index.md - Nicer CLI experience: I've moved to Cobra for a better command-line experience: among others, it is now possible to pass the flags after the arguments. This wasn't possible when using the std lib
flaglibrary.
Known issues
- I've noticed that if
config.yamlcan't be found somehow,hudevtowon't let you know and will silently use the Hugo default configuration; the symptom will be that the base URL of article start with/instead of the value passed in config.yaml'sbaseURL.
Full Changelog: 0.2.0...0.3.0
0.2.0
Changes since 0.1.0
Anchor IDs in links are now converted
Anchor links are now converted from the Hugo format to the Devto syntax. For context, Devto and Hugo produce slightly different anchor IDs. Let us consider the following Markdown snippet in which we refer to a heading using an anchor. The anchor's syntax that Hugo uses is the same in GitHub-flavoured Markdown:
## Docker and the `HTTPS_PROXY` variableproduces:
<h2 id="docker-and-the-https-proxy-variable">Docker and the <code>HTTPS_PROXY</code> variable</h2>In Devto, the anchors that get generated are different:
<h2 id="docker-and-the-raw-httpsproxy-endraw-variable">Docker and the <code>HTTPS_PROXY</code> variable</h2>In order to "translate" from the Hugo syntax to the Devto syntax, the page is parsed another time (Hugo already parsed it) so that we can list the headings and do a mapping between the Hugo anchors and the Devto anchors. The above example should now look like this: If an anchor isn't found in the document, you will now be warned.
<img> tags are now "absolulified"
In the previous version, the images were already converted so that Devto can use them. Since you can also embed <img> tags in markdown, these are also converted. More precisely, the "base path" is added to the src URL so that Devto can find the image.
For example:
<img src="dnat-google-vpc-how-comes-back.svg"/>is now converted to:
<img src="https://maelvls.dev/you-should-write-comments/dnat-google-vpc-how-comes-back.svg"/>Fix a problem with fetching unpublished articles
A while back, Devto used to return the unpublished articles with the endpoint GET /articles/:id. I switched from using that endpoint to GET /articles/me/published and GET /articles/me/unpublished.
Proper help command (hudevto help)
The help command is now much more helpful and opens in a pager (same behavior as git help):
