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

System setting for documentation url #7782

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

josegar74
Copy link
Member

Currently the documentation URL is hardcoded in Javascript code. In this change a new system setting is added, to allow customising the documentation URL.

documentationurl-system-setting

This is useful to self host the documentation, applying custom branding.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@jodygarnett
Copy link
Contributor

This configuration change makes sense to me, may I also ask for an option for "online help" (it can be a separate PR), for links referencing https://docs.geonetwork-opensource.org/stable/help/ or embedded /doc/ which should be included with the geonetwork.war.

Including embedded docs was a long standing feature of the maven build which I fixed recently.

Copy link
Contributor

@jodygarnett jodygarnett left a comment

Choose a reason for hiding this comment

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

Request change from /stable/ to /{version}/

@@ -593,6 +593,7 @@ INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system
INSERT INTO Settings (name, value, datatype, position, internal, encrypted) VALUES ('system/proxy/password', NULL, 0, 550, 'y', 'y');
INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/proxy/ignorehostlist', NULL, 0, 560, 'y');
INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/cors/allowedHosts', '*', 0, 561, 'y');
INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/documentation/url', 'https://docs.geonetwork-opensource.org/{{version}}/{{lang}}', 0, 570, 'n');
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks correct!

@fxprunayre fxprunayre merged commit 761e167 into geonetwork:main Feb 22, 2024
6 checks passed
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 6abe90708e... System setting for documentation url
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging web-ui/src/main/resources/catalog/locales/en-admin.json
Auto-merging web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql
CONFLICT (modify/delete): web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v443/migrate-default.sql deleted in HEAD and modified in 6abe90708e (System setting for documentation url).  Version 6abe90708e (System setting for documentation url) of web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v443/migrate-default.sql left in tree.

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-7782-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 6abe90708e03d6dc560997e1e8b4e74597cc9301,6fd929d139c98636e80aa1e4d0097787b57a287b,b7004f93452c200c81cb19d931a8f67849ea22c0
# Push it to GitHub
git push --set-upstream origin backport-7782-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-7782-to-4.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants