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

Create site.php config for site-specific settings #237

Merged
merged 22 commits into from
Jul 18, 2022

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Jul 18, 2022

About

This update makes breaking changes to the configuration. You will need to update your configuration to continue using the new changes. Each one has been documented in this changelog entry, which at the end has an upgrade guide.

Changed

  • Moved config option hyde.name to site.name
  • Moved config option hyde.site_url to site.site_url
  • Moved config option hyde.pretty_urls to site.pretty_urls
  • Moved config option hyde.generate_sitemap to site.generate_sitemap
  • Moved config option hyde.language to site.language
  • Moved config option hyde.output_directory to site.output_directory

Removed

  • Removed internal $siteName config variable from config/hyde.php

Upgrade Guide

Site-specific config options have been moved from config/hyde.php to config/site.php. The Hyde config is now used to configure behaviour of the site, while the site config is used to customize the look and feel, the presentation, of the site.

The following configuration options have been moved. The actual usages remain the same, so you can upgrade by using copying over these options to the new file.

  • hyde.name
  • hyde.site_url
  • hyde.pretty_urls
  • hyde.generate_sitemap
  • hyde.language
  • hyde.output_directory

If you have published and Blade views or written custom code that uses the config options, you may need to update them. You can do this by republishing the Blade views, and/or using search and replace across your code. VSCode has a useful feature to make this a breeze: CMD/CTRL+Shift+F.

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

codecov bot commented Jul 18, 2022

Codecov Report

Merging #237 (52a7ec8) into master (a7bfc78) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              master      #237   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
+ Complexity       817       802   -15     
===========================================
  Files            103       102    -1     
  Lines           2094      2022   -72     
===========================================
- Hits            2094      2022   -72     
Impacted Files Coverage Δ
.../Actions/GeneratesDocumentationSearchIndexFile.php 100.00% <100.00%> (ø)
...framework/src/Commands/HydeBuildSitemapCommand.php 100.00% <100.00%> (ø)
...mework/src/Commands/HydeBuildStaticSiteCommand.php 100.00% <100.00%> (ø)
...ackages/framework/src/Concerns/HasPageMetadata.php 100.00% <100.00%> (ø)
...es/framework/src/Concerns/Internal/FileHelpers.php 100.00% <100.00%> (ø)
packages/framework/src/HydeServiceProvider.php 100.00% <100.00%> (ø)
packages/framework/src/Services/RssFeedService.php 100.00% <100.00%> (ø)
packages/framework/src/Services/SitemapService.php 100.00% <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 a7bfc78...52a7ec8. Read the comment docs.

@caendesilva
Copy link
Member Author

First step is migrating all the config options. This is easily done by going through them one at a time, and using find+replace across all files in VSCode.
image
image

@caendesilva caendesilva changed the title Refactor configuration options Create site.php config for site-specific settings Jul 18, 2022
@caendesilva caendesilva marked this pull request as ready for review July 18, 2022 11:53
@caendesilva caendesilva merged commit fc18f3d into master Jul 18, 2022
@caendesilva caendesilva deleted the refactor-configuration-options branch July 18, 2022 11:53
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.

Create site.php config?
2 participants