Closed esthermmoturi closed 1 month ago
Thanks @mrjones-plip , here is the PR with the script. Let me run the script.
Results from: ./get.urls.sh > hosting.urls.txt
http://localhost:1313/apps/ http://localhost:1313/apps/concepts/ http://localhost:1313/apps/concepts/access/ http://localhost:1313/apps/concepts/care-guides/ http://localhost:1313/apps/concepts/forms/ http://localhost:1313/apps/concepts/hierarchy/ http://localhost:1313/apps/concepts/interoperability/ http://localhost:1313/apps/concepts/navigation/ http://localhost:1313/apps/concepts/prerequisites/ http://localhost:1313/apps/concepts/users/ http://localhost:1313/apps/concepts/workflows/ http://localhost:1313/apps/examples/ http://localhost:1313/apps/examples/anc/ http://localhost:1313/apps/examples/contact-tracing/ http://localhost:1313/apps/examples/covid-education/ http://localhost:1313/apps/examples/covid-rdt-reference-app/ http://localhost:1313/apps/examples/direct-to-client/ http://localhost:1313/apps/examples/ebs/ http://localhost:1313/apps/examples/interoperability/ http://localhost:1313/apps/examples/learning-care/ http://localhost:1313/apps/examples/pharmacovigilance-reference-app/ http://localhost:1313/apps/examples/phc-covid/ http://localhost:1313/apps/examples/pih/ http://localhost:1313/apps/examples/stock-monitoring/ http://localhost:1313/apps/examples/supervisor-reference-app/ http://localhost:1313/apps/examples/training/ http://localhost:1313/apps/features/ http://localhost:1313/apps/features/admin/ http://localhost:1313/apps/features/contacts/ http://localhost:1313/apps/features/integrations/ http://localhost:1313/apps/features/integrations/android/ http://localhost:1313/apps/features/integrations/custom/ http://localhost:1313/apps/features/integrations/dhis2/ http://localhost:1313/apps/features/integrations/openmrs/ http://localhost:1313/apps/features/integrations/oppia/ http://localhost:1313/apps/features/integrations/rapidpro/ http://localhost:1313/apps/features/messaging/ http://localhost:1313/apps/features/muting/ http://localhost:1313/apps/features/reports/ http://localhost:1313/apps/features/supervision/ http://localhost:1313/apps/features/targets/ http://localhost:1313/apps/features/tasks/ http://localhost:1313/apps/features/training/ http://localhost:1313/apps/features/uhc-mode/ http://localhost:1313/apps/guides/ http://localhost:1313/apps/guides/android/ http://localhost:1313/apps/guides/android/branding/ http://localhost:1313/apps/guides/android/publishing/ http://localhost:1313/apps/guides/data/ http://localhost:1313/apps/guides/data/analytics/ http://localhost:1313/apps/guides/data/analytics/building-dbt-models/ http://localhost:1313/apps/guides/data/analytics/couch2pg-to-cht-sync-migration/ http://localhost:1313/apps/guides/data/analytics/environment-variables/ http://localhost:1313/apps/guides/data/analytics/introduction/ http://localhost:1313/apps/guides/data/analytics/production/ http://localhost:1313/apps/guides/data/analytics/setup/ http://localhost:1313/apps/guides/data/analytics/testing-dbt-models/ http://localhost:1313/apps/guides/data/csv-to-docs/ http://localhost:1313/apps/guides/data/hydration/ http://localhost:1313/apps/guides/data/impact-metrics/ http://localhost:1313/apps/guides/data/invalid-reports/ http://localhost:1313/apps/guides/data/training-instance/ http://localhost:1313/apps/guides/data/users-bulk-load/ http://localhost:1313/apps/guides/database/ http://localhost:1313/apps/guides/database/couch2pg-oom-errors/ http://localhost:1313/apps/guides/database/couchdb-authentication/ http://localhost:1313/apps/guides/database/database-conflicts/ http://localhost:1313/apps/guides/database/muting_in_dashboards/ http://localhost:1313/apps/guides/database/querying_apdex_telemetry/ http://localhost:1313/apps/guides/database/rdbms-from-mac/ http://localhost:1313/apps/guides/database/rdbms-from-windows/ http://localhost:1313/apps/guides/debugging/ http://localhost:1313/apps/guides/debugging/obtaining-logs/ http://localhost:1313/apps/guides/debugging/replicating-production-data-locally/ http://localhost:1313/apps/guides/debugging/secure-sharing-of-developer-instance/ http://localhost:1313/apps/guides/debugging/sharing-4x-logs/ http://localhost:1313/apps/guides/forms/ http://localhost:1313/apps/guides/forms/additional-docs/ http://localhost:1313/apps/guides/forms/app-form-sms/ http://localhost:1313/apps/guides/forms/form-inputs/ http://localhost:1313/apps/guides/forms/google-drive/ http://localhost:1313/apps/guides/forms/multimedia/ http://localhost:1313/apps/guides/forms/report-titles/ http://localhost:1313/apps/guides/forms/uhc-mode/ http://localhost:1313/apps/guides/forms/versioning/ http://localhost:1313/apps/guides/forms/wealth-quintiles/ http://localhost:1313/apps/guides/integrations/ http://localhost:1313/apps/guides/integrations/dhis2-aggregate/ http://localhost:1313/apps/guides/integrations/openmrs/ http://localhost:1313/apps/guides/integrations/oppia/ http://localhost:1313/apps/guides/integrations/rapidpro/ http://localhost:1313/apps/guides/messaging/ http://localhost:1313/apps/guides/messaging/gateways/ http://localhost:1313/apps/guides/messaging/gateways/africas-talking/ http://localhost:1313/apps/guides/messaging/gateways/gateway/ http://localhost:1313/apps/guides/messaging/gateways/gateway/configuration/ http://localhost:1313/apps/guides/messaging/gateways/gateway/phones/ http://localhost:1313/apps/guides/messaging/gateways/gateway/troubleshooting/ http://localhost:1313/apps/guides/messaging/gateways/rapidpro/ http://localhost:1313/apps/guides/messaging/gateways/rapidpro_cht_gateway/ http://localhost:1313/apps/guides/messaging/message-loops/ http://localhost:1313/apps/guides/messaging/shortcodes/ http://localhost:1313/apps/guides/messaging/sms-states/ http://localhost:1313/apps/guides/performance/ http://localhost:1313/apps/guides/performance/purging/ http://localhost:1313/apps/guides/performance/replication/ http://localhost:1313/apps/guides/performance/telemetry/ http://localhost:1313/apps/guides/privacy/ http://localhost:1313/apps/guides/privacy/policy/ http://localhost:1313/apps/guides/privacy/privacy-policy/ http://localhost:1313/apps/guides/security/ http://localhost:1313/apps/guides/security/securely-onboarding-users-at-scale/ http://localhost:1313/apps/guides/security/securing-android/ http://localhost:1313/apps/guides/tasks/ http://localhost:1313/apps/guides/tasks/pass-data-to-form/ http://localhost:1313/apps/guides/tasks/query-task-data/ http://localhost:1313/apps/guides/tasks/task-schema-parameters/ http://localhost:1313/apps/guides/training/ http://localhost:1313/apps/guides/training/onboarding/ http://localhost:1313/apps/guides/training/training-cards-resources/ http://localhost:1313/apps/guides/training/training-cards/ http://localhost:1313/apps/guides/updates/ http://localhost:1313/apps/guides/updates/collect-forms-update/ http://localhost:1313/apps/guides/updates/feature-flags/ http://localhost:1313/apps/guides/updates/moving-contacts/ http://localhost:1313/apps/guides/updates/preparing-for-4/ http://localhost:1313/apps/reference/ http://localhost:1313/apps/reference/api/ http://localhost:1313/apps/reference/app-settings/ http://localhost:1313/apps/reference/app-settings/accept_case_reports/ http://localhost:1313/apps/reference/app-settings/assetlinks/ http://localhost:1313/apps/reference/app-settings/dhis2/ http://localhost:1313/apps/reference/app-settings/forms/ http://localhost:1313/apps/reference/app-settings/header_tabs/ http://localhost:1313/apps/reference/app-settings/hierarchy/ http://localhost:1313/apps/reference/app-settings/outbound/ http://localhost:1313/apps/reference/app-settings/patient_reports/ http://localhost:1313/apps/reference/app-settings/registrations/ http://localhost:1313/apps/reference/app-settings/reminders/ http://localhost:1313/apps/reference/app-settings/replication_depth/ http://localhost:1313/apps/reference/app-settings/replications/ http://localhost:1313/apps/reference/app-settings/schedules/ http://localhost:1313/apps/reference/app-settings/sms/ http://localhost:1313/apps/reference/app-settings/token_login/ http://localhost:1313/apps/reference/app-settings/transitions/ http://localhost:1313/apps/reference/app-settings/user-permissions/ http://localhost:1313/apps/reference/app-settings/user-roles/ http://localhost:1313/apps/reference/contact-page/ http://localhost:1313/apps/reference/extension-libs/ http://localhost:1313/apps/reference/forms/ http://localhost:1313/apps/reference/forms/app/ http://localhost:1313/apps/reference/forms/collect/ http://localhost:1313/apps/reference/forms/contact/ http://localhost:1313/apps/reference/resources/ http://localhost:1313/apps/reference/targets/ http://localhost:1313/apps/reference/tasks/ http://localhost:1313/apps/reference/translations/ http://localhost:1313/apps/tutorials/ http://localhost:1313/apps/tutorials/app-forms/ http://localhost:1313/apps/tutorials/application-graphics/ http://localhost:1313/apps/tutorials/application-settings/ http://localhost:1313/apps/tutorials/application-tests/ http://localhost:1313/apps/tutorials/condition-cards/ http://localhost:1313/apps/tutorials/contact-and-users-1/ http://localhost:1313/apps/tutorials/contact-and-users-2/ http://localhost:1313/apps/tutorials/contact-summary/ http://localhost:1313/apps/tutorials/couch2pg-setup/ http://localhost:1313/apps/tutorials/death-reporting/ http://localhost:1313/apps/tutorials/form-properties/ http://localhost:1313/apps/tutorials/local-setup/ http://localhost:1313/apps/tutorials/localizing-cht/ http://localhost:1313/apps/tutorials/multi-facility-users/ http://localhost:1313/apps/tutorials/sms-forms/ http://localhost:1313/apps/tutorials/sms-schedules/ http://localhost:1313/apps/tutorials/targets/ http://localhost:1313/apps/tutorials/tasks-1/ http://localhost:1313/apps/tutorials/tasks-2/ http://localhost:1313/apps/tutorials/user-management-tool/
yup - that's what I'm seeing too @esthermmoturi , 174
404s when I run the two scripts:
./check.urls.sh hosting.urls.txt | grep -c 404
174
I might be able to bulk add all the missing aliases - gimme ~30 min here...
I have a fix to most of the aliases! I'll push the commit in the next ~hour
ok - I did a bulk fix with some brute force code (as opposed to actually writing a function :shrug: ):
cd
into the cht-docs/content/en/building
directoryls -d -1 "$PWD/"**/* |grep \.md
sed
command that replaced the 2nd ---
in the front matter with the alias we need:
sed -i ':a;N;$!ba;s/---/aliases:\n - \/apps\/concepts\/access\n----/2' /home/mrjones/Documents/MedicMobile/cht-docs/content/en/building/concepts/access.md
in your spreadsheet create a column for each segment of the command pro typed above:
1st | 2nd | 3rd | 4th |
---|---|---|---|
sed -i ':a;N;$!ba;s/---/aliases:\n - |
\/apps\/concepts\/care-guides |
\n----/2 |
/home/mrjones/Documents/MedicMobile/cht-docs/content/en/building/concepts/care-guides.md |
sed -i ':a;N;$!ba;s/---/aliases:\n - |
\/apps\/concepts\/forms |
\n----/2 |
/home/mrjones/Documents/MedicMobile/cht-docs/content/en/building/concepts/forms.md |
hugo
compiles finealiases:
in them ./check.urls.sh hosting.urls.txt |grep 404
:
http://localhost:1313/apps/features/ 404
http://localhost:1313/apps/features/integrations/ 404
http://localhost:1313/apps/features/integrations/rapidpro/ 404
http://localhost:1313/apps/guides/android/branding/ 404
http://localhost:1313/apps/guides/android/publishing/ 404
http://localhost:1313/apps/guides/data/analytics/ 404
http://localhost:1313/apps/guides/data/users-bulk-load/ 404
http://localhost:1313/apps/guides/integrations/rapidpro/ 404
http://localhost:1313/apps/guides/messaging/gateways/africas-talking/ 404
http://localhost:1313/apps/guides/messaging/gateways/gateway/ 404
http://localhost:1313/apps/guides/messaging/gateways/gateway/phones/ 404
http://localhost:1313/apps/guides/privacy/privacy-policy/ 404
http://localhost:1313/apps/guides/updates/preparing-for-4/ 404
./check.urls.sh hosting.urls.txt |grep 404
Thank you so much @mrjones-plip for helping me add the aliases. @michaelkohn thanks for reviewing :)
Rename
CHT Applications
toBuilding
in the first commit of revamping the site and fix all referenced links. - Refer to this conversation.