Skip to content

Conversation

bendichter
Copy link
Contributor

in response to #44

@bendichter bendichter changed the base branch from main to pipeline June 11, 2025 12:04
@bendichter
Copy link
Contributor Author

redirect_map.json

@bendichter
Copy link
Contributor Author

file.htaccess.zip

@bendichter bendichter changed the title Make redirect json map Make redirect htaccess map Jun 11, 2025
@bendichter
Copy link
Contributor Author

@olinux can you take it from here?

Copy link
Member

@olinux olinux left a comment

Choose a reason for hiding this comment

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

This already looks very good - we need to see how we can "transfer" the htaccess file to the FTP server as part of the pipeline still.

@bendichter
Copy link
Contributor Author

This already looks very good - we need to see how we can "transfer" the htaccess file to the FTP server as part of the pipeline still.

that sounds hard

@Raphael-Gazzotti
Copy link
Member

requests should be added in requirements.txt

page_path = f"instance_libraries/terminologies/{inst_type}.html"

anchor = _anchorize(filename)
uri = f"/instances/{inst_type}/{filename}"
Copy link
Member

@Raphael-Gazzotti Raphael-Gazzotti Jul 8, 2025

Choose a reason for hiding this comment

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

Suggested change
uri = f"/instances/{inst_type}/{filename}"
if inst_type in ["Licenses", "contentTypes"]:
uri = f"/instances/{inst_type}/{filename}"
elif inst_type == 'terminologies':
uri = f"/instances/{subdir}/{filename}"
elif inst_type == 'parcellationEntities':
uri = f"/instances/parcellationEntity/{filename}"
elif inst_type == 'brainAtlases':
uri = f"/instances/brainAtlas/{filename}"
else:
uri = f"/instances/{inst_type[:-1]}/{filename}"

@bendichter
Copy link
Contributor Author

Hi @Raphael-Gazzotti , I don't really have more time to work on this, but feel free to take this over

@Raphael-Gazzotti Raphael-Gazzotti added the docu Improvements or additions to documentation label Jul 9, 2025
Comment on lines +8 to +10
It produces a JSON file named `redirect_map.json` in the project root, e.g.

"/types/Subject": "https://openminds.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It produces a JSON file named `redirect_map.json` in the project root, e.g.
"/types/Subject": "https://openminds.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject"
It produces a file named `.htaccess` in the project root, e.g.
Redirect 301 "/types/Subject" "https://openminds.docs.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject"

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

Labels

docu Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants