mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
SEO init (#4197)
# Description of Changes This pull request introduces dynamic document meta tag management and improves URL routing and tool metadata handling in the frontend. The most significant changes are the addition of a custom hook to update document meta tags (including OpenGraph tags) based on the selected tool, enhancements to the tool selection context for better URL synchronization, and enrichment of the `Tool` type and tool registry with more metadata. **Dynamic document meta management:** * Added a new `useDocumentMeta` hook that updates the page's `<title>`, description, and OpenGraph meta tags based on the currently selected tool, and restores the original values on cleanup. (`frontend/src/hooks/useDocumentMeta.ts`) * Integrated `useDocumentMeta` into `HomePageContent` so the document's meta tags dynamically reflect the selected tool's metadata, improving SEO and social sharing. (`frontend/src/pages/HomePage.tsx`) [[1]](diffhunk://#diff-85c26b21681286c20e97a26a4912f0b91812776c9d4d0c54aa541fded2565c7eR2-R8) [[2]](diffhunk://#diff-85c26b21681286c20e97a26a4912f0b91812776c9d4d0c54aa541fded2565c7eR17) [[3]](diffhunk://#diff-85c26b21681286c20e97a26a4912f0b91812776c9d4d0c54aa541fded2565c7eR28-R37) **Tool metadata and context improvements:** * Enhanced the `Tool` type and tool registry to include `title` and `description` fields, which are now translated and used throughout the UI and meta tags. (`frontend/src/types/tool.ts`, `frontend/src/hooks/useToolManagement.tsx`) [[1]](diffhunk://#diff-0b557df7bd27ac90cd2f925ddd8ef8096ea2decfaee9a5c12a94dc7a03c64bfaR46) [[2]](diffhunk://#diff-57f8a6b3e75ecaec10ad445b01afe8fccc376af6f8ad4d693c68cf98e8863273L116-R118) * Updated the `ToolWorkflowContext` to use the new `Tool` type for `selectedTool`, replacing the previous `ToolConfiguration` type. (`frontend/src/contexts/ToolWorkflowContext.tsx`) [[1]](diffhunk://#diff-9b36e2c06dddbcfba6cb66fd0b303b7860f88ca8b562bb2534af1ab50390d385L6-R8) [[2]](diffhunk://#diff-9b36e2c06dddbcfba6cb66fd0b303b7860f88ca8b562bb2534af1ab50390d385L72-R72) **URL routing and synchronization:** * Implemented logic in `ToolWorkflowContext` to synchronize the selected tool with the browser URL, initialize tool selection from the URL on load, and handle browser navigation (back/forward) for tool selection. (`frontend/src/contexts/ToolWorkflowContext.tsx`) --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
@@ -347,7 +347,7 @@
|
||||
"title": "Περιστροφή",
|
||||
"desc": "Εύκολη περιστροφή των PDF σας."
|
||||
},
|
||||
"imageToPdf": {
|
||||
"imageToPDF": {
|
||||
"title": "Εικόνα σε PDF",
|
||||
"desc": "Μετατροπή εικόνας (PNG, JPEG, GIF) σε PDF."
|
||||
},
|
||||
@@ -371,7 +371,7 @@
|
||||
"title": "Αλλαγή δικαιωμάτων",
|
||||
"desc": "Αλλαγή των δικαιωμάτων του εγγράφου PDF"
|
||||
},
|
||||
"removePages": {
|
||||
"pageRemover": {
|
||||
"title": "Αφαίρεση",
|
||||
"desc": "Διαγραφή ανεπιθύμητων σελίδων από το έγγραφο PDF."
|
||||
},
|
||||
@@ -383,7 +383,7 @@
|
||||
"title": "Αφαίρεση κωδικού",
|
||||
"desc": "Αφαίρεση προστασίας κωδικού από το έγγραφο PDF."
|
||||
},
|
||||
"compressPdfs": {
|
||||
"compress": {
|
||||
"title": "Συμπίεση",
|
||||
"desc": "Συμπίεση PDF για μείωση του μεγέθους αρχείου."
|
||||
},
|
||||
@@ -479,7 +479,7 @@
|
||||
"title": "Pipeline",
|
||||
"desc": "Εκτέλεση πολλαπλών ενεργειών σε PDF ορίζοντας scripts pipeline"
|
||||
},
|
||||
"add-page-numbers": {
|
||||
"addPageNumbers": {
|
||||
"title": "Προσθήκη αριθμών σελίδων",
|
||||
"desc": "Προσθήκη αριθμών σελίδων σε όλο το έγγραφο σε συγκεκριμένη θέση"
|
||||
},
|
||||
@@ -487,7 +487,7 @@
|
||||
"title": "Αυτόματη μετονομασία αρχείου PDF",
|
||||
"desc": "Αυτόματη μετονομασία ενός PDF με βάση την ανιχνευμένη κεφαλίδα"
|
||||
},
|
||||
"adjust-contrast": {
|
||||
"adjustContrast": {
|
||||
"title": "Προσαρμογή χρωμάτων/αντίθεσης",
|
||||
"desc": "Προσαρμογή αντίθεσης, κορεσμού και φωτεινότητας ενός PDF"
|
||||
},
|
||||
@@ -499,7 +499,7 @@
|
||||
"title": "Αυτόματος διαχωρισμός σελίδων",
|
||||
"desc": "Αυτόματος διαχωρισμός σαρωμένου PDF με φυσικό σαρωμένο διαχωριστή σελίδων QR Code"
|
||||
},
|
||||
"sanitizePdf": {
|
||||
"sanitizePDF": {
|
||||
"title": "Εξυγίανση",
|
||||
"desc": "Αφαίρεση scripts και άλλων στοιχείων από αρχεία PDF"
|
||||
},
|
||||
@@ -523,11 +523,11 @@
|
||||
"title": "Λήψη ΟΛΩΝ των πληροφοριών του PDF",
|
||||
"desc": "Λήψη όλων των δυνατών πληροφοριών για τα PDF"
|
||||
},
|
||||
"extractPage": {
|
||||
"pageExtracter": {
|
||||
"title": "Εξαγωγή σελίδας(ων)",
|
||||
"desc": "Εξαγωγή επιλεγμένων σελίδων από PDF"
|
||||
},
|
||||
"PdfToSinglePage": {
|
||||
"pdfToSinglePage": {
|
||||
"title": "Ενιαία μεγάλη σελίδα",
|
||||
"desc": "Συγχώνευση όλων των σελίδων PDF σε μία μεγάλη σελίδα"
|
||||
},
|
||||
@@ -543,11 +543,11 @@
|
||||
"title": "Χειροκίνητη απόκρυψη",
|
||||
"desc": "Απόκρυψη σε PDF βάσει επιλεγμένου κειμένου, σχεδιασμένων σχημάτων και/ή επιλεγμένων σελίδων"
|
||||
},
|
||||
"tableExtraxt": {
|
||||
"PDFToCSV": {
|
||||
"title": "PDF σε CSV",
|
||||
"desc": "Εξαγωγή πινάκων από PDF και μετατροπή σε CSV"
|
||||
},
|
||||
"autoSizeSplitPDF": {
|
||||
"split-by-size-or-count": {
|
||||
"title": "Αυτόματος διαχωρισμός ανά μέγεθος/πλήθος",
|
||||
"desc": "Διαχωρισμός ενός PDF σε πολλαπλά έγγραφα βάσει μεγέθους, αριθμού σελίδων ή αριθμού εγγράφων"
|
||||
},
|
||||
@@ -563,11 +563,11 @@
|
||||
"title": "Προσθήκη σφραγίδας σε PDF",
|
||||
"desc": "Προσθήκη κειμένου ή εικόνων σφραγίδας σε καθορισμένες θέσεις"
|
||||
},
|
||||
"removeImagePdf": {
|
||||
"removeImage": {
|
||||
"title": "Αφαίρεση εικόνας",
|
||||
"desc": "Αφαίρεση εικόνας από PDF για μείωση μεγέθους αρχείου"
|
||||
},
|
||||
"splitPdfByChapters": {
|
||||
"splitByChapters": {
|
||||
"title": "Διαχωρισμός PDF ανά κεφάλαια",
|
||||
"desc": "Διαχωρισμός ενός PDF σε πολλαπλά αρχεία βάσει της δομής κεφαλαίων."
|
||||
},
|
||||
@@ -575,7 +575,7 @@
|
||||
"title": "Επικύρωση υπογραφής PDF",
|
||||
"desc": "Επαλήθευση ψηφιακών υπογραφών και πιστοποιητικών σε έγγραφα PDF"
|
||||
},
|
||||
"replaceColorPdf": {
|
||||
"replace-color": {
|
||||
"title": "Αντικατάσταση και αναστροφή χρώματος",
|
||||
"desc": "Αντικατάσταση χρώματος για κείμενο και φόντο σε PDF και αναστροφή πλήρους χρώματος για μείωση μεγέθους αρχείου"
|
||||
}
|
||||
@@ -1558,4 +1558,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user