dockerhub-description
                                
                                 dockerhub-description copied to clipboard
                                
                                    dockerhub-description copied to clipboard
                            
                            
                            
                        Emojis and images issues
Hi! First of all, thanks for creating this extremely useful action.
I use it in many of my projects. Just want to make two suggestions:
- emojis are not rendered on Docker Hub. It would be nice to replace all emojis like :whale:with the equivalent UTF-8 :whale: before deploying the markdown file
- images with relative paths are not displayed correctly on Docker Hub. It would be nice to prepend https://raw.githubusercontent.com/<user_name>/<repo_name>/<branch_name>/to all relative images paths before deploying the markdown file
See my desktainer repo and the related Docker Hub page for an example of what i mean.
I know that these problems are not this action's fault but Docker Hub's, so feel free to close this issue if you don't wanna do these.
Hi @dmotte
Glad you have found the action useful. 👍
Thank you for the suggestions. I can see how these features would be convenient, but I wonder if it could get a bit messy and difficult to handle all the possible cases where there are markdown differences. My initial thought was that this kind of feature could be a separate action step in the workflow to do this conversion. I don't think I will try and implement anything at the moment, but I'll leave this issue open to gather input from other users that might have similar issues.
In the meantime, here are some suggestions for you:
- Create a README-DOCKERHUB.mdthat is formatted using markdown that can be rendered by Docker Hub.
- Change your existing README.mdto fit the Docker Hub format. e.g. Use UTF-8 emojis instead of colon-separated.
- Add a workflow step to do the conversion before calling this action. (If you get this working please share the step)
Hi @peter-evans
thank you for this action!
I worked on a simple solution for three use cases (markdown anchors in README.md, relative urls to image resources, relative urls to other file resources). Are there more you have in mind?
I'm wondering if you would accept a pull request that implements the following logic in Type Script?
https://github.com/mrtwnklr/apprise-it-for-me/commit/c5e4b5c68692f4f6a0b08f0e3e36d2c88aae9981
I'm wondering if you would accept a pull request that implements the following logic in Type Script?
At a glance it looks good! Please do make a pull request for this logic. My only concern is whether we can make sure it doesn't clobber links that are actually fine. As long the regex is scoped tightly enough to target "broken" links then it looks good.
The patterns ignore all links that seems to have a trailing protocol. It should be robust.
(Edit: with one exception: local markdown anchors)
I'll take the time next week and provide a first draft for testing.
Thank you @mrtwnklr for working on this feature to convert relative URLs. It should complete the second point raised in this issue.
For the first point about emojis like :whale: not being rendered. I'll see if there is a good npm library to do a lookup based on the name, and check how feasible it would be to search and replace.