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

[site/theme,#88]: Custom links component with support for video embeds in MDX #95

Closed
wants to merge 8 commits into from

Conversation

khalilcodes
Copy link
Contributor

@khalilcodes khalilcodes commented Mar 23, 2022

Video URL links such as https://www.youtube.com/watch?v=z2uAg-AIs-Y (Youtube, etc) surrounded by newlines in markdown will embed an iframe on the page.
*Similar concept from: https://github.com/agentofuser/remark-oembed

Additional support for links added (since a custom link component is being created):

  • next/link for internal links (also checks for links containing a '.md' extension)
  • a tags for external links

Notes: moving to contentlayer, md pages now support raw html making the iframe display on page #88 (comment)

@netlify
Copy link

netlify bot commented Mar 23, 2022

Deploy Preview for boring-fermat-22cb64 ready!

Name Link
🔨 Latest commit f96193a
🔍 Latest deploy log https://app.netlify.com/sites/boring-fermat-22cb64/deploys/623ca9197ec2df00082326f0
😎 Deploy Preview https://deploy-preview-95--boring-fermat-22cb64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@rufuspollock
Copy link
Member

@khalilcodes this looks like it has conflicts. Are you able to resolve and then we merge?

@khalilcodes
Copy link
Contributor Author

@rufuspollock yes, will update the code.

@rufuspollock
Copy link
Member

@khalilcodes is this ready to merge? Also can you point to an example page using it in the preview deploy ...

@khalilcodes
Copy link
Contributor Author

@rufuspollock I will replace the iframe with the youtube link in one of the 'notes/...' page and commit so it can be previwed.

@khalilcodes
Copy link
Contributor Author

@rufuspollock a working preview can be seen here - https://deploy-preview-95--boring-fermat-22cb64.netlify.app/notes/are-crypto-tokens-securities ... looks like it's ready to be merged.

@khalilcodes
Copy link
Contributor Author

khalilcodes commented Mar 24, 2022

@rufuspollock @sdiehl I would suggest we revert the concepts links and the ideologies folder after this merge since the links component has been added in this pr and would resolve # 97. Scratch that, I may need to test this more.

Right now if we merge this the links are broken again as seen in preview.

@sdiehl
Copy link
Collaborator

sdiehl commented Mar 24, 2022

I reverted the last commit that flattened the subdirectory.

@rufuspollock
Copy link
Member

@khalilcodes can you summarize where we are at - i also note this PR has got a bit messy including both fixes to titles (?) and youtube change etc.

Can you put in a PR just for the titles fix. Then do a PR just for youtube stuff.

Aside: i think we create a "test.md" where we can put whatever we want to test and not mess with the other pages.

@khalilcodes
Copy link
Contributor Author

Closing this PR and resubmitting a new one with youtube stuff only.

@khalilcodes khalilcodes deleted the video-component branch April 11, 2022 12:01
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.

None yet

3 participants