Skip to content

Commit

Permalink
feat(seo): add schema org
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Oct 14, 2024
1 parent f49943a commit e604558
Show file tree
Hide file tree
Showing 12 changed files with 2,407 additions and 2,274 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,31 @@ jobs:
- tag: prod-fr
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://api.werewolves-assistant.com"
NUXT_PUBLIC_DEFAULT_LOCALE: "fr"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "https://werewolves-assistant.com"
NUXT_SITE_NAME: "Assistant Loups-Garous"
NUXT_SITE_ENV: "production"
NUXT_SITE_DESCRIPTION: "L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™"
- tag: prod-en
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://api.werewolves-assistant.com"
NUXT_PUBLIC_DEFAULT_LOCALE: "en"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "https://werewolves-assistant.com"
NUXT_SITE_NAME: "Werewolves Assistant"
NUXT_SITE_ENV: "production"
NUXT_SITE_DESCRIPTION: "The perfect tool for game masters of the Werewolves of Miller's Hollow™"
- tag: local-prod-fr
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9191"
NUXT_PUBLIC_DEFAULT_LOCALE: "fr"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "http://localhost:3000"
NUXT_SITE_NAME: "Assistant Loups-Garous"
NUXT_SITE_ENV: "production"
NUXT_SITE_DESCRIPTION: "L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™"
- tag: local-prod-en
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9191"
NUXT_PUBLIC_DEFAULT_LOCALE: "en"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "http://localhost:3000"
NUXT_SITE_NAME: "Werewolves Assistant"
NUXT_SITE_ENV: "production"
Expand Down Expand Up @@ -65,6 +69,7 @@ jobs:
build-args: |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL=${{ matrix.NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL }}
NUXT_PUBLIC_DEFAULT_LOCALE=${{ matrix.NUXT_PUBLIC_DEFAULT_LOCALE }}
NUXT_PUBLIC_CONTACT_EMAIL=${{ matrix.NUXT_PUBLIC_CONTACT_EMAIL }}
NUXT_SITE_URL=${{ matrix.NUXT_SITE_URL }}
NUXT_SITE_NAME=${{ matrix.NUXT_SITE_NAME }}
NUXT_SITE_ENV=${{ matrix.NUXT_SITE_ENV }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push-on-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,31 @@ jobs:
- tag: preprod-fr
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://preprod.api.werewolves-assistant.com"
NUXT_PUBLIC_DEFAULT_LOCALE: "fr"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "https://preprod.werewolves-assistant.com"
NUXT_SITE_NAME: "Preprod Assistant Loups-Garous"
NUXT_SITE_ENV: "development"
NUXT_SITE_DESCRIPTION: "[Preprod] - L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™"
- tag: preprod-en
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://preprod.api.werewolves-assistant.com"
NUXT_PUBLIC_DEFAULT_LOCALE: "en"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "https://preprod.werewolves-assistant.com"
NUXT_SITE_NAME: "Preprod Werewolves Assistant"
NUXT_SITE_ENV: "development"
NUXT_SITE_DESCRIPTION: "[Preprod] - The perfect tool for game masters of the Werewolves of Miller's Hollow™"
- tag: local-preprod-fr
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9292"
NUXT_PUBLIC_DEFAULT_LOCALE: "fr"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "http://localhost:3001"
NUXT_SITE_NAME: "Preprod Assistant Loups-Garous"
NUXT_SITE_ENV: "development"
NUXT_SITE_DESCRIPTION: "[Preprod] - L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™"
- tag: local-preprod-en
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9292"
NUXT_PUBLIC_DEFAULT_LOCALE: "en"
NUXT_PUBLIC_CONTACT_EMAIL: "antoine.zanardi@epitech.eu"
NUXT_SITE_URL: "http://localhost:3001"
NUXT_SITE_NAME: "Preprod Werewolves Assistant"
NUXT_SITE_ENV: "development"
Expand All @@ -64,6 +68,7 @@ jobs:
build-args: |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL=${{ matrix.NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL }}
NUXT_PUBLIC_DEFAULT_LOCALE=${{ matrix.NUXT_PUBLIC_DEFAULT_LOCALE }}
NUXT_PUBLIC_CONTACT_EMAIL=${{ matrix.NUXT_PUBLIC_CONTACT_EMAIL }}
NUXT_SITE_URL=${{ matrix.NUXT_SITE_URL }}
NUXT_SITE_NAME=${{ matrix.NUXT_SITE_NAME }}
NUXT_SITE_ENV=${{ matrix.NUXT_SITE_ENV }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ Environment variables are :
|:-----------------------------------------------:|:----------------------------------------------------------------------:|:--------:|:-------------:|:----------------------------------------------:|
| `NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL` | URL of the Werewolves Assistant API ||| Must be a valid URL |
| `NUXT_PUBLIC_DEFAULT_LOCALE` | Locale used when starting the app || `en` | Must be either `en` or `fr` |
| `NUXT_PUBLIC_CONTACT_EMAIL` | Contact email for the app ||| Must be a valid email address |
| `SKIP_SCREENSHOTS_COMPARISON_TESTS` | In E2E tests, skip all screenshots comparisons, not used in production || `false` | Must be either `true` or `false` |
| `NUXT_SITE_URL` | Used for SEO, base URL for the site ||| Must be a valid URL |
| `NUXT_SITE_NAME` | Used for SEO, name of the site (Used in titles) ||| Must be a valid string |
Expand Down
7 changes: 6 additions & 1 deletion app/components/pages/index/IndexFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a
id="contact-button"
class="p-button p-button-secondary"
href="mailto: antoine.zanardi@epitech.eu"
:href="contactButtonHref"
>
<FontAwesomeIcon
icon="envelope"
Expand All @@ -29,4 +29,9 @@
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import GitHubRepositoryButton from "~/components/shared/external/GitHubRepositoryButton/GitHubRepositoryButton.vue";
const runtimeConfig = useRuntimeConfig();
const { contactEmail } = runtimeConfig.public;
const contactButtonHref = `mailto:${contactEmail}`;
</script>
1 change: 1 addition & 0 deletions config/vitest/vitest.unit-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default defineVitestConfig({
public: {
defaultLocale: "en",
werewolvesAssistantApi: { baseUrl: "http://127.0.0.1" },
contactEmail: "john@doe.com",
},
},
},
Expand Down
1 change: 1 addition & 0 deletions env/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL="http://127.0.0.1:8080"
NUXT_PUBLIC_DEFAULT_LOCALE="en"
NUXT_PUBLIC_CONTACT_EMAIL="john@doe.com"
NUXT_SITE_URL="http://127.0.0.1:3000"
NUXT_SITE_NAME="Werewolves Assistant"
NUXT_SITE_ENV="development"
Expand Down
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export default defineNuxtConfig({
public: {
defaultLocale: "en",
werewolvesAssistantApi: { baseUrl: "" },
contactEmail: "",
},
},
schemaOrg: {
Expand All @@ -255,7 +256,7 @@ export default defineNuxtConfig({
],
contactPoint: {
type: "ContactPoint",
email: "antoine.zanardi@epitech.eu",
email: process.env.NUXT_PUBLIC_CONTACT_EMAIL,
contactType: "Creator",
},
},
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/home/features/home.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: 🏠 Home Page
And the link with name "What is it?" should be visible
And the link with name "Contact the creator" should be visible
And the link with name "Contact the creator" should have the following attributes
| name | value |
| href | mailto: antoine.zanardi@epitech.eu |
| name | value |
| href | mailto: john@doe.com |
And the link with name "This project is open-source!" should be visible
And the page should match or creates the missing snapshot with name "Home Page"

Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/features/support/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const { beforeEach, afterEach, afterAll, setup } = createTest({
env: {
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: WEREWOLVES_ASSISTANT_SANDBOX_API_BASE_URL,
NUXT_PUBLIC_DEFAULT_LOCALE: I18N_TEST_LOCALE,
NUXT_PUBLIC_CONTACT_EMAIL: "john@doe.com",
NUXT_SITE_URL: "http://127.0.0.1:4000",
NUXT_SITE_NAME: "Werewolves Assistant",
NUXT_SITE_ENV: "test",
Expand All @@ -37,6 +38,7 @@ const { beforeEach, afterEach, afterAll, setup } = createTest({
public: {
defaultLocale: I18N_TEST_LOCALE,
werewolvesAssistantApi: { baseUrl: WEREWOLVES_ASSISTANT_SANDBOX_API_BASE_URL },
contactEmail: "john@doe.com",
},
},
},
Expand Down
Loading

0 comments on commit e604558

Please sign in to comment.