Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

iwaduarte
Copy link

@iwaduarte iwaduarte commented Sep 21, 2023

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. 👍

Copy link
Owner

@shahednasser shahednasser left a 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

@iwaduarte
Copy link
Author

iwaduarte commented Sep 22, 2023

@shahednasser Yeah sure. I will add a line to the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants