-
Notifications
You must be signed in to change notification settings - Fork 4k
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
This PR fixes issue #1300 #1601
base: master
Are you sure you want to change the base?
Conversation
A Contribution for URL shortcut, now, Abbreviation .html directs to the exact page!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving just to move this along but can other folks take a closer look at this before we merge?
This is fantastic. I'm going to do a full review on it hopefully in the next day or two but I'm really excited about this. Thank you! |
This is fantastic - thank you very very much! |
Build is failing here @Farreeda |
echo " - /${shortcut}.html" | ||
else | ||
#echo "❌ Failed to create shortcuts for ${shortcut}" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script fails here, I assume because there's nothing in the else clause except for the comment. Uncommenting the line fixes this.
However, when I run this locally and run make serve
the shortcuts don't seem to work. I also don't see where the script reads redirects.yml - it looks like the script is automatically generating the shortcuts which makes me wonder how it will handle possible duplicates. Can you please clarify the process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback, @szh! I appreciate your insights and apologize for not testing every case @mackowski. The redirects.yml file now includes abbreviations for each path, and it can be easily modified and updated as needed. The XSS
and auth
issues should be resolved now, but please note that abbreviations should be followed by .html
Thank you, @jmanico, for bringing attention to my PR!
@szh can you review it again? |
Add URL Shortening for Cheat Sheets
Description
This PR adds automatic URL shortening functionality to make cheat sheets more accessible through memorable shortcuts. Instead of typing long URLs, users can now access cheat sheets using abbreviated paths.
For example:
/XSS.html
→cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
/SSRF.html
→cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
/SQLi.html
→cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
Changes
Generate_Site_mkDocs.sh
/XSS.html
)Testing
After running
Test shortcuts:
Benefits
Related Issues
Closes #1300