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

Only enable support files when there are related pages #448

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Aug 28, 2022

Fixes #443

  • The RSS feed related generators are now only enabled when there are blog posts
  • The documentation search related generators are now only enabled when there are documentation pages

This may seem like a big change, but in actuality, these files were not generated when running the standard build command unless the pages existed, so it makes no sense to have links to them in the site.

Comment related to the issue:

Okay, so this was discovered when running php hyde build on a new project without any posts. An RSS feed is not generated then as the build command has an extra check to see if there are any posts. Same with documentation. This is of course inconsistent with how we handle it in other places. So something needs to be changed. It then begs the design question, should we add generate these files (rss and search) when there are no files for them to link to? I think no, but I could be wrong. For now, I think I will merge the extra checks in the build command to apply to the features check directly.

Originally posted by @caendesilva in #443 (comment)

@caendesilva caendesilva linked an issue Aug 28, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 28, 2022

Codecov Report

Merging #448 (9a31f05) into master (25de138) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #448   +/-   ##
=========================================
  Coverage     99.95%   99.95%           
  Complexity      914      914           
=========================================
  Files           106      106           
  Lines          2258     2258           
=========================================
  Hits           2257     2257           
  Misses            1        1           
Impacted Files Coverage Δ
...mework/src/Commands/HydeBuildStaticSiteCommand.php 100.00% <100.00%> (ø)
packages/framework/src/Helpers/Features.php 100.00% <100.00%> (ø)

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 f14b087 into master Aug 28, 2022
@caendesilva caendesilva deleted the 443-rss-feed-meta-link-should-not-be-added-if-there-is-not-a-feed branch August 28, 2022 19:04
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.

RSS feed meta link should not be added if there is not a feed
2 participants