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

Refactor footer component to use includes facade #246

Merged
merged 8 commits into from
Jul 18, 2022

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Jul 18, 2022

Footer

Most websites have a footer with copyright details and contact information. You probably want to change the Markdown to include your information, though you are of course welcome to keep the default attribution link!

The footer component is made up of a few levels of components, depending on how much you want to customize.

Customizing the Markdown text

There are two ways to customize the footer text. First, you can set it in the configuration file:

// filepath: config/hyde.php
'footer' => 'Site proudly built with [HydePHP](https://github.com/hydephp/hyde) 🎩',

If you don't want to write Markdown in the configuration file, you can create a Markdown file in your includes directory. When this file is found, it will be used instead of the configuration setting.

// filepath: resources/_includes/footer.md
Site proudly built with [HydePHP](https://github.com/hydephp/hyde) 🎩

In both cases the parsed Markdown will be rendered in the footer Blade component.

Customizing the Blade component

The actual footer component is rendered using the layouts/footer.blade.php Blade template.

In this template we automatically render the configured footer Markdown text. If you want to change this behaviour, for example, HydePHP.com uses a more sophisticated footer, simply publish the footer component.

Disabling the footer entirely

If you don't want to have a footer on your site, you can set the 'footer' configuration option to false.

// filepath: config/hyde.php
'footer' => 'false',

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #246 (92a2b3c) into master (ae444dc) will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##              master      #246   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       814       814           
===========================================
  Files            103       103           
  Lines           2045      2045           
===========================================
  Hits            2045      2045           
Impacted Files Coverage Δ
...s/framework/src/Actions/ConvertsFooterMarkdown.php 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae444dc...92a2b3c. Read the comment docs.

@caendesilva caendesilva marked this pull request as ready for review July 18, 2022 17:16
@caendesilva caendesilva merged commit 58ac94f into master Jul 18, 2022
@caendesilva caendesilva deleted the refactor-footer-component-to-use-includes-facade branch July 18, 2022 17:16
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