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

Allow footer configuration #303

Merged
merged 8 commits into from
May 1, 2021

Conversation

Kaligule
Copy link
Contributor

@Kaligule Kaligule commented Apr 28, 2021

Introduced some new configuration options. These are the default values:

params:
  footer:
    enable: true
    navigation:
      enable: true
    contactMe:
      enable: true
    credentials:
      enable: true
  newsletter: # not new, but similar to new options
    enable: false

Where should the documentation go?

Please note that I am technically a web developer, but not familiar with hugo in the slightest. I am very happy about constructive feedback.

Btw it might be easier to review the commits one by one because the indentation makes the diff look more crazy than it is.

Issue

#224

Doesn't solve that issue completly as it is about the footer and the navbar. The navbar was a bit over my head at this moment.

Description

Allows to disable/enable parts of the footer (or all of the footer).

Test Evidence

Footer disabled

Screenshot_2021-04-28_12:59:29

Navigation disabled

Screenshot_2021-04-28_12:58:53

Footer enabled, but all parts of it disabled

Screenshot_2021-04-28_12:58:14

Copyright notice disabled

Screenshot_2021-04-28_13:01:28

Default is to have the footer enabled (to keep backwards
compatibility).

The diff looks much worse than it is, I just added a variable and an
if clause, but then had to indent the rest of the file.

Make footerEnabled an explicit variable.

This should improve readability.

Use default parameter for even more readability.
Just set `footer.contactMe.enable` in the config. Default is true, for
backwards compatibility.
Enabling footers elements and the newsletter is now managed in the
same place.
@hossainemruz hossainemruz added the enhancement New feature or request label Apr 28, 2021
@hossainemruz
Copy link
Member

@Kaligule Thank you for the PR. I think footer should be just another section so that user can use custom template for it.

@Kaligule
Copy link
Contributor Author

@hossainemruz I don't think I can help there. Do I understand you correctly that you do not want to merge this PR but work on your own solution? (I this case I will have to point my site to my own fork until you succeded.)

Copy link
Member

@hossainemruz hossainemruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kaligule . I have made little adjustment. Now, user can provide a template for the footer.

@Kaligule
Copy link
Contributor Author

Kaligule commented May 2, 2021

Cool, thanks :)

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

Successfully merging this pull request may close these issues.

2 participants