├── .eslintrc
├── test
├── modules
│ └── default-page
│ │ ├── views
│ │ └── page.html
│ │ └── index.js
├── package.json
└── index.js
├── .gitignore
├── i18n
├── en.json
├── sk.json
├── pt-BR.json
├── de.json
├── fr.json
├── it.json
└── es.json
├── package.json
├── LICENSE.md
├── .github
└── workflows
│ └── main.yml
├── CHANGELOG.md
├── README.md
└── index.js
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [ "apostrophe" ]
3 | }
--------------------------------------------------------------------------------
/test/modules/default-page/views/page.html:
--------------------------------------------------------------------------------
1 |
{{ data.page.title }}
2 |
--------------------------------------------------------------------------------
/test/modules/default-page/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extend: '@apostrophecms/page-type'
3 | };
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore MacOS X metadata forks (fusefs)
2 | ._*
3 | package-lock.json
4 | *.DS_Store
5 | node_modules
6 |
7 | # vim swp files
8 | .*.sw*
9 |
--------------------------------------------------------------------------------
/test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "/**": "This package.json file is not actually installed.",
3 | " * ": "Apostrophe requires that all npm modules to be loaded by moog",
4 | " */": "exist in package.json at project level, which for a test is here",
5 | "dependencies": {
6 | "apostrophe": "git+https://github.com/apostrophecms/apostrophe.git",
7 | "@apostrophecms/redirect": "git+https://github.com/apostrophecms/redirect.git"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Redirect",
3 | "pluralLabel": "Redirects",
4 | "originalSlug": "Old URL",
5 | "originalSlugHelp": "Format with leading slash (e.g., /old-url)",
6 | "title": "Description",
7 | "urlType": "Link Type",
8 | "urlTypeInternal": "Internal Page",
9 | "urlTypeExternal": "URL",
10 | "ignoreQuery": "Ignore query string when matching",
11 | "forwardQuery": "Forward query string",
12 | "newPage": "Page Title",
13 | "external": "URL",
14 | "statusCode": "Redirect Type",
15 | "statusCodeHtmlHelp": "- Use \"Temporary\" for temporary redirects or for testing purposes.
- Use \"Permanent\" after testing, this is an SEO best practice. ⚠️ Search engines will cache these, so check carefully.
",
16 | "302": "Temporary (status code 302)",
17 | "301": "Permanent (status code 301)"
18 | }
--------------------------------------------------------------------------------
/i18n/sk.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Presmerovať",
3 | "pluralLabel": "Presmerovania",
4 | "originalSlug": "Pôvodná URL",
5 | "originalSlugHelp": "Formát s lomítkom (napr., /povodna-url)",
6 | "title": "Popis",
7 | "urlType": "Typ odkazu",
8 | "urlTypeInternal": "Interná URL stránka",
9 | "urlTypeExternal": "URL",
10 | "ignoreQuery": "Ignorovať reťazec dotazu pri zhode.",
11 | "forwardQuery": "Presmerovať reťazec dotazu.",
12 | "newPage": "Názov stránky",
13 | "external": "URL",
14 | "statusCode": "Typ presmerovania",
15 | "statusCodeHtmlHelp": "- Použite \"Dočasný\" na dočasné presmerovanie alebo na testovacie účely.
- Použite \"Trvalý\" až po testovaní - je to osvedčený postup SEO. ⚠️ Vyhľadávače ich zaznamenávajú, preto ich starostlivo skontrolujte.
",
16 | "302": "Dočasný (stavový kód 302)",
17 | "301": "Trvalý (stavový kód 301)"
18 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@apostrophecms/redirect",
3 | "version": "1.5.0",
4 | "description": "Manage redirects for apostropheCMS",
5 | "main": "index.js",
6 | "scripts": {
7 | "lint": "npm run eslint",
8 | "eslint": "eslint .",
9 | "test": "npm run lint && mocha"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/apostrophecms/redirect.git"
14 | },
15 | "homepage": "https://github.com/apostrophecms/redirect#readme",
16 | "author": "Apostrophe Technologies",
17 | "license": "MIT",
18 | "devDependencies": {
19 | "apostrophe": "github:apostrophecms/apostrophe",
20 | "eslint": "^7.9.0",
21 | "eslint-config-apostrophe": "^3.4.0",
22 | "eslint-config-standard": "^14.1.1",
23 | "eslint-plugin-import": "^2.22.0",
24 | "eslint-plugin-node": "^11.1.0",
25 | "eslint-plugin-promise": "^4.2.1",
26 | "eslint-plugin-standard": "^4.0.1",
27 | "mocha": "^10.2.0"
28 | }
29 | }
--------------------------------------------------------------------------------
/i18n/pt-BR.json:
--------------------------------------------------------------------------------
1 | {
2 | "301": "Permanente (código de status 301)",
3 | "302": "Temporário (código de status 302)",
4 | "label": "Redirecionar",
5 | "pluralLabel": "Redirecionamentos",
6 | "originalSlug": "URL Antiga",
7 | "originalSlugHelp": "Formato com barra inicial (por exemplo, /antiga-url)",
8 | "title": "Descrição",
9 | "urlType": "Tipo de Link",
10 | "urlTypeInternal": "Página Interna",
11 | "urlTypeExternal": "URL",
12 | "ignoreQuery": "Ignorar string de consulta ao combinar",
13 | "forwardQuery": "Encaminhar string de consulta",
14 | "newPage": "Título da Página",
15 | "external": "URL",
16 | "statusCode": "Tipo de Redirecionamento",
17 | "statusCodeHtmlHelp": "- Use \"Temporário\" para redirecionamentos temporários ou para fins de teste.
- Use \"Permanente\" após os testes, essa é uma boa prática de SEO. ⚠️ Os motores de busca vão armazenar em cache, então verifique com cuidado.
"
18 | }
19 |
--------------------------------------------------------------------------------
/i18n/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "301": "Permanent (Statuscode 301)",
3 | "302": "Vorübergehend (Statuscode 302)",
4 | "label": "Weiterleitung",
5 | "pluralLabel": "Weiterleitungen",
6 | "originalSlug": "Alte URL",
7 | "originalSlugHelp": "Format mit führendem Schrägstrich (z.B. /alte-url)",
8 | "title": "Beschreibung",
9 | "urlType": "Linktyp",
10 | "urlTypeInternal": "Interne Seite",
11 | "urlTypeExternal": "URL",
12 | "ignoreQuery": "Query-String bei der Übereinstimmung ignorieren",
13 | "forwardQuery": "Query-String weiterleiten",
14 | "newPage": "Seitentitel",
15 | "external": "URL",
16 | "statusCode": "Weiterleitungstyp",
17 | "statusCodeHtmlHelp": "- Verwenden Sie \"Vorübergehend\" für vorübergehende Weiterleitungen oder zu Testzwecken.
- Verwenden Sie \"Permanent\" nach dem Testen, dies ist eine bewährte SEO-Praxis. ⚠️ Suchmaschinen werden diese zwischenspeichern, also überprüfen Sie dies sorgfältig.
"
18 | }
19 |
--------------------------------------------------------------------------------
/i18n/fr.json:
--------------------------------------------------------------------------------
1 | {
2 | "301": "Permanent (code de statut 301)",
3 | "302": "Temporaire (code de statut 302)",
4 | "label": "Redirection",
5 | "pluralLabel": "Redirections",
6 | "originalSlug": "Ancienne URL",
7 | "originalSlugHelp": "Format avec une barre oblique au début (par exemple, /ancienne-url)",
8 | "title": "Description",
9 | "urlType": "Type de lien",
10 | "urlTypeInternal": "Page interne",
11 | "urlTypeExternal": "URL",
12 | "ignoreQuery": "Ignorer la chaîne de requête lors de la correspondance",
13 | "forwardQuery": "Transférer la chaîne de requête",
14 | "newPage": "Titre de la page",
15 | "external": "URL",
16 | "statusCode": "Type de redirection",
17 | "statusCodeHtmlHelp": "- Utilisez \"Temporaire\" pour les redirections temporaires ou à des fins de test.
- Utilisez \"Permanent\" après test, c'est une meilleure pratique SEO. ⚠️ Les moteurs de recherche mettront cela en cache, vérifiez donc attentivement.
"
18 | }
19 |
--------------------------------------------------------------------------------
/i18n/it.json:
--------------------------------------------------------------------------------
1 | {
2 | "301": "Permanente (codice di stato 301)",
3 | "302": "Temporaneo (codice di stato 302)",
4 | "label": "Reindirizza",
5 | "pluralLabel": "Reindirizzamenti",
6 | "originalSlug": "URL vecchia",
7 | "originalSlugHelp": "Formato con barra iniziale (ad es., /vecchia-url)",
8 | "title": "Descrizione",
9 | "urlType": "Tipo di collegamento",
10 | "urlTypeInternal": "Incolla un URL",
11 | "urlTypeExternal": "URL",
12 | "ignoreQuery": "Ignora la stringa di query durante il matching",
13 | "forwardQuery": "Inoltra la stringa di query",
14 | "newPage": "Titolo della pagina",
15 | "external": "URL",
16 | "statusCode": "Tipo di reindirizzamento",
17 | "statusCodeHtmlHelp": "- Utilizza \"Temporaneo\" per reindirizzamenti temporanei o per scopi di test.
- Utilizza \"Permanente\" dopo aver effettuato dei test, questa è una buona pratica SEO. ⚠️ I motori di ricerca memorizzeranno questi, quindi controlla attentamente.
"
18 | }
19 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2021 Apostrophe Technologies
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/i18n/es.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Redirección de URL",
3 | "pluralLabel": "Redirecciones de URLs",
4 | "originalSlug": "URL Previo",
5 | "originalSlugHelp": "Formato con la barra (/) (ej., /url-previo)",
6 | "title": "Descripción",
7 | "urlType": "Tipo de Liga o Enlace",
8 | "urlTypeInternal": "Página Interna",
9 | "urlTypeExternal": "URL",
10 | "ignoreQuery": "Ignorar la cadena de consulta al igualar el URL.",
11 | "forwardQuery": "Reenviar la cadena de consulta.",
12 | "newPage": "Título de la Página",
13 | "external": "URL",
14 | "statusCode": "Tipo de Redirección",
15 | "statusCodeHtmlHelp": "