-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes and updates #45
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
On a side note, looking at the code after not touching it for a long time makes me cringe 😅
I'll give it some good review hopefully throughout the weekend. However, can you explain the importance of the canonical URL? I don't mean just in the PR, but also in the README.md
@shahednasser Yeah sure. I will add a line to the README.md |
hi @shahednasser,
I have created several functions on this PR.
The main goal is to allow more freedom when deploying locally using markdown files. The functions could be extended to other parts of the code yet I wanted to keep it simple to make a point that we probably do not need to rely on selectors
crosspost run -l
This command goes to a remote location where the blog is already posted. It grabs the HTML and will apply some algorithms to determine the main content div (instead of the --selector approach). It will then merge the src images with the markdown .
i.e whatever => [whatever](https://localcanonicalurl.com/doggoimage.png
The approach is to use text density and specific text tags and try to match the common nearest selector between these.
I have also added a cross configuration between OS in this repo in order to prevent conflict between two different environments (CRLF vs. LF). I use Windows and you probably use macOS.
I have added JSDOC style docs to the function the way you used across the files. It is worth noting that I code a little bit differently than this current codebase. If you need me to change anything please let me know.
I have also added a few fixes that were breaking the cli, fixed some eslint complaining and all. Hope it is okay. Thanks again.
Anything let me know. 👍