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

Add Hyperlinks::mediaLink() method #922

Merged
merged 6 commits into from
Feb 5, 2023

Conversation

caendesilva
Copy link
Member

Convenience method that's a Mix between Hyde::relativeLink() and Hyde::image().

It's accessible as Hyde::mediaLink() and can be used in Blade views to get a resolved relative link to a file in the media directory.

@caendesilva caendesilva marked this pull request as ready for review February 5, 2023 17:47
@caendesilva caendesilva force-pushed the add-hyperlinks-media-link-method branch from d44b8fd to bf88462 Compare February 5, 2023 17:55
@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Merging #922 (bb78d28) into master (9ca6d38) will not change coverage.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##              master      #922     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1235      2474   +1239     
=============================================
  Files            145       290    +145     
  Lines           3265      6538   +3273     
=============================================
+ Hits            3265      6538   +3273     
Impacted Files Coverage Δ
packages/framework/src/Hyde.php 100.00% <ø> (ø)
...ork/src/Foundation/Concerns/ForwardsHyperlinks.php 100.00% <100.00%> (ø)
packages/framework/src/Foundation/Hyperlinks.php 100.00% <100.00%> (ø)
...rk/Features/Blogging/Models/LocalFeaturedImage.php 100.00% <0.00%> (ø)
...es/framework/src/Console/Commands/ServeCommand.php 100.00% <0.00%> (ø)
...rk/src/Framework/Factories/BlogPostDataFactory.php 100.00% <0.00%> (ø)
...Markdown/Processing/CodeblockFilepathProcessor.php 100.00% <0.00%> (ø)
...amework/src/Console/HydeConsoleServiceProvider.php 100.00% <0.00%> (ø)
...undation/Concerns/HandlesFoundationCollections.php 100.00% <0.00%> (ø)
develop/packages/framework/src/Pages/BladePage.php 100.00% <0.00%> (ø)
... and 138 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@caendesilva caendesilva merged commit 427e8ac into master Feb 5, 2023
@caendesilva caendesilva deleted the add-hyperlinks-media-link-method branch February 5, 2023 18:10
@what-the-diff
Copy link

what-the-diff bot commented Feb 5, 2023

  • Added mediaLink method to ForwardsHyperlinks trait
  • Implemented the new mediaLink method in Hyperlinks class
  • Added a test for the new functionality of Hyde::mediaLink() helper function (HydeKernelTest)

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.

1 participant