From a06bc7d07cf678621a51c71a0a46f95fdfb25de7 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 13 Nov 2018 16:47:49 +0100 Subject: [PATCH] :alien: ajoute un nouveau nom de domaine pour le site en francais MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ajoute des links hreflang pour lier les pages entre elles avec google - Prends en compte le lien passer en français / anglais TODO : mettre les noms de domaines dans des variables d'env --- netlify.toml | 63 ++++++++++- source/locales/en.yaml | 7 +- source/selectors/companyStatusSelectors.js | 1 + source/server.js | 16 +-- source/sites/mycompanyinfrance.fr/App.js | 10 +- .../{entry.js => entry.en.js} | 2 +- source/sites/mycompanyinfrance.fr/entry.fr.js | 7 ++ .../layout/Footer/Footer.js | 104 +++++++++++------- .../sites/mycompanyinfrance.fr/pages/404.js | 9 ++ .../pages/Company/CreationChecklist.js | 37 +++---- .../pages/Company/PickLegalStatus.js | 15 ++- .../pages/Company/StatusDescription.js | 2 +- .../pages/HiringProcess.js | 2 +- .../mycompanyinfrance.fr/pages/Sitemap.js | 17 +++ .../pages/SocialSecurity/Home.js | 2 +- .../sites/mycompanyinfrance.fr/sitePaths.js | 101 ++++++++++++----- .../sites/mycompanyinfrance.fr/sitemap.en.txt | 21 ++++ .../sites/mycompanyinfrance.fr/sitemap.fr.txt | 21 ++++ source/sites/mycompanyinfrance.fr/sitemap.txt | 21 ---- source/webpack.common.js | 22 +++- source/webpack.prod.js | 9 +- 21 files changed, 349 insertions(+), 140 deletions(-) rename source/sites/mycompanyinfrance.fr/{entry.js => entry.en.js} (69%) create mode 100644 source/sites/mycompanyinfrance.fr/entry.fr.js create mode 100644 source/sites/mycompanyinfrance.fr/pages/404.js create mode 100644 source/sites/mycompanyinfrance.fr/pages/Sitemap.js create mode 100644 source/sites/mycompanyinfrance.fr/sitemap.en.txt create mode 100644 source/sites/mycompanyinfrance.fr/sitemap.fr.txt delete mode 100644 source/sites/mycompanyinfrance.fr/sitemap.txt diff --git a/netlify.toml b/netlify.toml index 885e09f72..93320e3b6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,7 +8,7 @@ status = 200 [[redirects]] from = "https://mycompanyinfrance.fr/sitemap.txt" -to = "/sitemap.infrance.txt" +to = "/sitemap.infrance.en.txt" status = 200 [[redirects]] @@ -17,7 +17,7 @@ to = "/prerender/infrance/index.html" status = 200 [[redirects]] -from = "https://mycompanyinfrance.fr" +from = "https://mycompanyinfrance.fr/social-security" to = "/prerender/infrance/social-security/index.html" status = 200 @@ -26,6 +26,33 @@ from = "https://mycompanyinfrance.fr/*" to = "/infrance.html" status = 200 +# Mon-entreprise PRODUCTION settings +[[redirects]] +from = "https://mon-entreprise.beta.gouv.fr/robots.txt" +to = "/robots.infrance.txt" +status = 200 + +[[redirects]] +from = "https://mon-entreprise.beta.gouv.fr/sitemap.txt" +to = "/sitemap.infrance.fr.txt" +status = 200 + +[[redirects]] +from = "https://mon-entreprise.beta.gouv.fr" +to = "/prerender/mon-entreprise/index.html" +status = 200 + +[[redirects]] +from = "https://mon-entreprise.beta.gouv.fr/sécurité-sociale" +to = "/prerender/mon-entreprise/sécurité-sociale/index.html" +status = 200 + +[[redirects]] +from = "https://mon-entreprise.beta.gouv.fr/*" +to = "/mon-entreprise.html" +status = 200 + + # Embauche PRODUCTION settings [[redirects]] from = "https://embauche.beta.gouv.fr/stats" @@ -58,25 +85,53 @@ query = {s = "e"} to = "/prerender/embauche/index.html" status = 200 - [[redirects]] from = "/*" query = {s = "e"} to = "/embauche.html" status = 200 -# Redirect for infrance in staging and development settings +# Redirect to mycompanyinfrance in staging and development settings [[redirects]] from = "/" +query = {s = "m"} to = "/prerender/infrance/index.html" status = 200 [[redirects]] from = "/social-security" +query = {s = "m"} to = "/prerender/infrance/social-security/index.html" status = 200 [[redirects]] from = "/*" +query = {s = "m"} to = "/infrance.html" status = 200 + +# Redirect to mon-entreprise in staging and development settings +[[redirects]] +from = "/" +to = "/prerender/mon-entreprise/index.html" +status = 200 + +[[redirects]] +from = "/sécurité-sociale" +to = "/prerender/mon-entreprise/sécurité-sociale/index.html" +status = 200 + +[[redirects]] +from = "/*" +to = "/mon-entreprise.html" +status = 200 + + + +[context.deploy-preview.environment] +EN_SITE = "${path}?s=m" +FR_SITE = "${path}" + +[context.production.environment] +EN_SITE = "https://mycompanyinfrance.fr${path}" +FR_SITE = "https://mon-entreprise.beta.gouv.fr${path}" \ No newline at end of file diff --git a/source/locales/en.yaml b/source/locales/en.yaml index 14cee0b44..e1450a09d 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -237,7 +237,6 @@ entreprise: description: A complete todo list to help you create a {{companyStatus}} with the French administration.` titre: Create a {{companyStatus}} in France titre: Create a <1>{{companyStatus}} - intro: This todo list will guide you throughout all the necessary steps to register your titre1: Needed for registration nom: titre: Find a corporate name @@ -503,7 +502,9 @@ path: statusDirigeant: '/directors-status' nombreAssociés: '/multiple-associates' microEntreprise: '/micro-enterprise-or-individual-business' - sécurité sociale: + sécuritéSociale: index: '/social-security' - démarche embauche: + démarcheEmbauche: index: '/hiring-process' + +micro-entreprise: micro-enterprise diff --git a/source/selectors/companyStatusSelectors.js b/source/selectors/companyStatusSelectors.js index 58cf6b586..2d8eaa52c 100644 --- a/source/selectors/companyStatusSelectors.js +++ b/source/selectors/companyStatusSelectors.js @@ -92,6 +92,7 @@ const LEGAL_STATUS_DETAILS: { [status: string]: CompanyLegalStatus } = { } export type LegalStatus = $Keys + const QUESTION_LIST: Array = Object.keys( LEGAL_STATUS_DETAILS['SARL (minority director)'] ) diff --git a/source/server.js b/source/server.js index 1a76551fb..9a8c61f95 100644 --- a/source/server.js +++ b/source/server.js @@ -7,18 +7,14 @@ const config = require('./webpack.dev.js') const compiler = webpack(config) const history = require('connect-history-api-fallback') +const rewrite = basename => ({ + from: new RegExp(`^/${basename}/(.*)$|^/${basename}$`), + to: `/${basename}.html` +}) + app.use( history({ - rewrites: [ - { - from: /^\/embauche\/.*$|^\/embauche$/, - to: '/embauche.html' - }, - { - from: /^\/infrance\/.*$|^\/infrance$/, - to: '/infrance.html' - } - ] + rewrites: ['embauche', 'infrance', 'mon-entreprise'].map(rewrite) }) ) diff --git a/source/sites/mycompanyinfrance.fr/App.js b/source/sites/mycompanyinfrance.fr/App.js index 7394b7a8b..dcdf31cc1 100644 --- a/source/sites/mycompanyinfrance.fr/App.js +++ b/source/sites/mycompanyinfrance.fr/App.js @@ -20,6 +20,7 @@ import trackSimulatorActions from './middlewares/trackSimulatorActions' import CompanyIndex from './pages/Company' import HiringProcess from './pages/HiringProcess' import Landing from './pages/Landing' +import Sitemap from './pages/Sitemap' import SocialSecurity from './pages/SocialSecurity' import sitePaths from './sitePaths' @@ -46,14 +47,14 @@ const middlewares = [ class InFranceRoute extends Component { componentDidMount() { if (typeof sessionStorage !== 'undefined') { - sessionStorage['lang'] = 'en' + sessionStorage['lang'] = this.props.language } } render() { return ( { path={paths.démarcheEmbauche.index} component={HiringProcess} /> + {process.env.NODE_ENV !== 'production' && ( + + )}
diff --git a/source/sites/mycompanyinfrance.fr/entry.js b/source/sites/mycompanyinfrance.fr/entry.en.js similarity index 69% rename from source/sites/mycompanyinfrance.fr/entry.js rename to source/sites/mycompanyinfrance.fr/entry.en.js index a85ed24df..0c69efdef 100644 --- a/source/sites/mycompanyinfrance.fr/entry.js +++ b/source/sites/mycompanyinfrance.fr/entry.en.js @@ -4,4 +4,4 @@ import App from './App' let anchor = document.querySelector('#js') -render(, anchor) +render(, anchor) diff --git a/source/sites/mycompanyinfrance.fr/entry.fr.js b/source/sites/mycompanyinfrance.fr/entry.fr.js new file mode 100644 index 000000000..ca2406b61 --- /dev/null +++ b/source/sites/mycompanyinfrance.fr/entry.fr.js @@ -0,0 +1,7 @@ +import React from 'react' +import { render } from 'react-dom' +import App from './App' + +let anchor = document.querySelector('#js') + +render(, anchor) diff --git a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js index 30669a244..88a23cc5f 100644 --- a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js +++ b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js @@ -4,49 +4,79 @@ import withColours from 'Components/utils/withColours' import urssafSvg from 'Images/urssaf.svg' import { compose } from 'ramda' import React from 'react' +import emoji from 'react-easy-emoji' +import Helmet from 'react-helmet' +import { Trans, translate } from 'react-i18next' import { withRouter } from 'react-router' +import i18n from '../../../../i18n' import { feedbackBlacklist } from '../../config' +import { hrefLangLink } from '../../sitePaths' import './Footer.css' import betaGouvSvg from './logo-betagouv.svg' import Privacy from './Privacy' -import LangSwitcher from 'Components/LangSwitcher' -import { Trans, translate } from 'react-i18next' - -const Footer = ({ colours: { colour } }) => ( -
- - -
-) - +
+ + ) +} export default compose( withRouter, withColours, diff --git a/source/sites/mycompanyinfrance.fr/pages/404.js b/source/sites/mycompanyinfrance.fr/pages/404.js new file mode 100644 index 000000000..cdc9a911f --- /dev/null +++ b/source/sites/mycompanyinfrance.fr/pages/404.js @@ -0,0 +1,9 @@ +import React from 'react' +import emoji from 'react-easy-emoji' + +export default () => ( + <> +

404

+

{emoji('🙅')} La page que vous cherchez n'existe pas / plus

+ +) diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js b/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js index a6aa65a56..8f1be0def 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js @@ -13,10 +13,10 @@ import { connect } from 'react-redux' import { Link } from 'react-router-dom' import * as Animate from 'Ui/animate' import { CheckItem, Checklist } from 'Ui/Checklist' -import sitePaths from '../../sitePaths' +import sitePaths, { LANDING_LEGAL_STATUS_LIST } from '../../sitePaths' +import Page404 from '../404' import StatusDescription from './StatusDescription' import type { Match } from 'react-router' - import type { TFunction } from 'react-i18next' type Props = { @@ -38,16 +38,18 @@ const CreateCompany = ({ onStatusChange, t }: Props) => { - const companyStatus = match.params.status + const companyStatus = LANDING_LEGAL_STATUS_LIST.find( + status => t(status) === match.params.status + ) if (!companyStatus) { - return null + return } return ( {t(['entreprise.tâches.page.titre', 'Créer une {{companyStatus}}'], { - companyStatus + companyStatus: t(companyStatus) })}

- Créer une {{ companyStatus }} + + Créer une {{ companyStatus: t(companyStatus) }} +

{!statusChooserCompleted && ( <> @@ -76,28 +80,21 @@ const CreateCompany = ({

- +

)} -

- - Voici la liste des tâches nécessaires pour créer votre - -   - {companyStatus}. -

Pour créer votre société

- onChecklistInitialization(companyStatus || '', items) + onChecklistInitialization(companyStatus, items) } onItemCheck={onItemCheck} defaultChecked={companyCreationChecklist}> - {!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && ( + {!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && ( } /> - {companyStatus !== 'micro-enterprise' && ( + {companyStatus !== 'micro-entreprise' && ( )} - {!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && ( + {!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && ( )} - {!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && ( + {!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && ( diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js index 754ae7264..d002fed72 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js @@ -10,8 +10,7 @@ import type { RouterHistory } from 'react-router' import {compose} from 'ramda' import type { LegalStatus } from 'Selectors/companyStatusSelectors' import withLanguage from 'Components/utils/withLanguage' -import type -{ TFunction } from 'react-i18next' +import type { TFunction } from 'react-i18next' import sitePaths from '../../sitePaths'; const setMainStatus = () => {} @@ -24,11 +23,11 @@ type Props = { t: TFunction } -const StatusButton = ({ status }: { status: LegalStatus }) => ( +const StatusButton = translate()(({ status, t }: { status: LegalStatus, t: TFunction }) => ( - Créer une {status} + Créer une {t(status)} -) +)) const SetMainStatus = ({ history, possibleStatus, t, language }: Props) => { return ( @@ -129,10 +128,10 @@ const SetMainStatus = ({ history, possibleStatus, t, language }: Props) => { {(possibleStatus['Micro-enterprise (option EIRL)'] || possibleStatus['Micro-enterprise']) && (
  • - Micro-enterprise{language === 'fr' && ' '}: - + Micro-enterprise{language === 'fr' && ' (auto-entrepreneur) '}: +
    - +
  • )} diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/StatusDescription.js b/source/sites/mycompanyinfrance.fr/pages/Company/StatusDescription.js index 46b12b219..2cfc5d8e0 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/StatusDescription.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/StatusDescription.js @@ -58,7 +58,7 @@ const StatusDescription = ({ status }: Props) => (un seul associé peut être poursuivi pour la totalité de la dette) et indéfinie (responsable sur la totalité de son patrimoine personnel). - ) : status.toLowerCase().includes('micro-enterprise') ? ( + ) : status.includes('micro-entreprise') ? ( La micro-entreprise est une entreprise individuelle, soumise à un régime forfaitaire pour le calcul des impôts et le paiement des cotisations de diff --git a/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js b/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js index eca4ee42a..37e91f487 100644 --- a/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js +++ b/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js @@ -198,7 +198,7 @@ const HiringProcess = ({
  • Remettre la fiche de paie à votre employé
  • - + Obtenir un exemple de fiche de paie
    diff --git a/source/sites/mycompanyinfrance.fr/pages/Sitemap.js b/source/sites/mycompanyinfrance.fr/pages/Sitemap.js new file mode 100644 index 000000000..4f9c5626f --- /dev/null +++ b/source/sites/mycompanyinfrance.fr/pages/Sitemap.js @@ -0,0 +1,17 @@ +import React from 'react' +import sitePaths, { generateSiteMap } from '../sitePaths' +const SiteMap = () => ( + <> +

    Sitemap

    +
    +			{generateSiteMap(sitePaths()).map(path => (
    +				
    +					{path}
    +					
    +
    + ))} +
    + +) + +export default SiteMap diff --git a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js index 25f87bece..e5522f7b8 100644 --- a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js +++ b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js @@ -32,7 +32,7 @@ class SocialSecurity extends Component { {this.props.match.isExact && ( - +

    Protection sociale : coût et avantages

    La France a choisi d'offrir à ses citoyens une protection diff --git a/source/sites/mycompanyinfrance.fr/sitePaths.js b/source/sites/mycompanyinfrance.fr/sitePaths.js index 16b57a32d..f9942bcab 100644 --- a/source/sites/mycompanyinfrance.fr/sitePaths.js +++ b/source/sites/mycompanyinfrance.fr/sitePaths.js @@ -1,58 +1,74 @@ /* @flow */ -import { map } from 'ramda' +import { map, reduce, toPairs, zipObj } from 'ramda' import i18n from '../../i18n' -const constructLocalizedSitePath = () => - constructSitePaths('', { +import type { LegalStatus } from 'Selectors/companyStatusSelectors' + +export const LANDING_LEGAL_STATUS_LIST: Array = [ + 'EI', + 'EIRL', + 'EURL', + 'SAS', + 'SARL', + 'SASU', + 'SNC', + 'micro-entreprise' +] + +const translateTo = language => (str1, str2, options = {}) => + i18n.t([str1, str2].filter(Boolean), { + ...(language ? { lng: language } : {}), + ...options + }) +const constructLocalizedSitePath = language => { + const t = translateTo(language) + return constructSitePaths('', { index: '', entreprise: { - index: i18n.t('path.entreprise.index', '/entreprise'), - votreEntreprise: i18n.t( + index: t('path.entreprise.index', '/entreprise'), + votreEntreprise: t( 'path.entreprise.votreEntreprise', '/votre-entreprise' ), - créer: (companyStatus: string) => - i18n.t(['path.entreprise.créer', '/créer-une-{{companyStatus}}'], { - companyStatus + créer: (companyStatus: LegalStatus | ':status') => + t('path.entreprise.créer', '/créer-une-{{companyStatus}}', { + companyStatus: + companyStatus === ':status' ? ':status' : t(companyStatus) }), - trouver: i18n.t('path.entreprise.trouver', '/retrouver-votre-entreprise'), - après: i18n.t('path.entreprise.après', '/après-la-création'), + trouver: t('path.entreprise.trouver', '/retrouver-votre-entreprise'), + après: t('path.entreprise.après', '/après-la-création'), statusJuridique: { - index: i18n.t( - 'path.entreprise.statusJuridique.index', - '/status-juridique' - ), - liste: i18n.t('path.entreprise.statusJuridique.liste', '/liste'), - liability: i18n.t( + index: t('path.entreprise.statusJuridique.index', '/status-juridique'), + liste: t('path.entreprise.statusJuridique.liste', '/liste'), + liability: t( 'path.entreprise.statusJuridique.responsabilité', '/responsabilité' ), - directorStatus: i18n.t( + directorStatus: t( 'path.entreprise.statusJuridique.statusDirigeant', '/status-du-dirigeant' ), - microEnterprise: i18n.t( + microEnterprise: t( 'path.entreprise.statusJuridique.microEntreprise', '/micro-entreprise-ou-entreprise-individuelle' ), - multipleAssociates: i18n.t( + multipleAssociates: t( 'path.entreprise.statusJuridique.nombreAssociés', '/nombre-associés' ), - minorityDirector: i18n.t( + minorityDirector: t( 'path.entreprise.statusJuridique.gérantMinoritaire', '/gérant-majoritaire-ou-minoritaire' ) } }, sécuritéSociale: { - index: i18n.t('path.sécuritéSociale', '/sécurité-sociale'), - simulation: '/simulation' + index: t('path.sécuritéSociale.index', '/sécurité-sociale') }, démarcheEmbauche: { - index: i18n.t('path.démarcheEmbauche', '/démarches-embauche') + index: t('path.démarcheEmbauche.index', '/démarches-embauche') } }) - +} const constructSitePaths = ( root: string, { index, ...sitePaths }: { index: string } @@ -63,8 +79,8 @@ const constructSitePaths = ( typeof value === 'string' ? root + index + value : typeof value === 'function' - ? (...args) => root + index + value(...args) - : constructSitePaths(root + index, value), + ? (...args) => root + index + value(...args) + : constructSitePaths(root + index, value), sitePaths ) }) @@ -75,3 +91,36 @@ i18n.on('languageChanged', () => { }) export default () => sitePath +const deepReduce = (fn, initialValue, object: Object) => + reduce( + (acc, [key, value]) => + typeof value === 'object' + ? deepReduce(fn, acc, value) + : fn(acc, value, key), + initialValue, + toPairs(object) + ) + +export const generateSiteMap = (sitePaths: Object) => + deepReduce( + (paths, path, key) => [ + ...paths, + ...(typeof path === 'function' && key === 'créer' + ? LANDING_LEGAL_STATUS_LIST.map(path) + : [path]) + ], + [], + sitePaths + ) + +const enSiteMap = generateSiteMap(constructLocalizedSitePath('en')).map(path => + (process.env.EN_SITE || `/infrance${path}`).replace('${path}', path) +) +const frSiteMap = generateSiteMap(constructLocalizedSitePath('fr')).map(path => + (process.env.FR_SITE || `/mon-entreprise${path}`).replace('${path}', path) +) + +export const hrefLangLink = { + en: zipObj(enSiteMap, frSiteMap.map(href => [{ href, hrefLang: 'fr' }])), + fr: zipObj(frSiteMap, enSiteMap.map(href => [{ href, hrefLang: 'en' }])) +} diff --git a/source/sites/mycompanyinfrance.fr/sitemap.en.txt b/source/sites/mycompanyinfrance.fr/sitemap.en.txt new file mode 100644 index 000000000..0d1002107 --- /dev/null +++ b/source/sites/mycompanyinfrance.fr/sitemap.en.txt @@ -0,0 +1,21 @@ +https://mycompanyinfrance.fr/company +https://mycompanyinfrance.fr/company/my-company +https://mycompanyinfrance.fr/company/create-a-EI +https://mycompanyinfrance.fr/company/create-a-EIRL +https://mycompanyinfrance.fr/company/create-a-EURL +https://mycompanyinfrance.fr/company/create-a-SAS +https://mycompanyinfrance.fr/company/create-a-SARL +https://mycompanyinfrance.fr/company/create-a-SASU +https://mycompanyinfrance.fr/company/create-a-SNC +https://mycompanyinfrance.fr/company/create-a-micro-enterprise +https://mycompanyinfrance.fr/company/find +https://mycompanyinfrance.fr/company/after-registration +https://mycompanyinfrance.fr/company/legal-status +https://mycompanyinfrance.fr/company/legal-status/list +https://mycompanyinfrance.fr/company/legal-status/liability +https://mycompanyinfrance.fr/company/legal-status/directors-status +https://mycompanyinfrance.fr/company/legal-status/micro-enterprise-or-individual-business +https://mycompanyinfrance.fr/company/legal-status/multiple-associates +https://mycompanyinfrance.fr/company/legal-status/chairman-or-managing-director +https://mycompanyinfrance.fr/social-security +https://mycompanyinfrance.fr/hiring-process \ No newline at end of file diff --git a/source/sites/mycompanyinfrance.fr/sitemap.fr.txt b/source/sites/mycompanyinfrance.fr/sitemap.fr.txt new file mode 100644 index 000000000..f9c75fa25 --- /dev/null +++ b/source/sites/mycompanyinfrance.fr/sitemap.fr.txt @@ -0,0 +1,21 @@ +https://mon-entreprise.beta.gouv.fr/entreprise +https://mon-entreprise.beta.gouv.fr/entreprise/votre-entreprise +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-EI +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-EIRL +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-EURL +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-SAS +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-SARL +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-SASU +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-SNC +https://mon-entreprise.beta.gouv.fr/entreprise/créer-une-micro-entreprise +https://mon-entreprise.beta.gouv.fr/entreprise/retrouver-votre-entreprise +https://mon-entreprise.beta.gouv.fr/entreprise/après-la-création +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/liste +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/responsabilité +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/status-du-dirigeant +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/micro-entreprise-ou-entreprise-individuelle +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/nombre-associés +https://mon-entreprise.beta.gouv.fr/entreprise/status-juridique/gérant-majoritaire-ou-minoritaire +https://mon-entreprise.beta.gouv.fr/sécurité-sociale +https://mon-entreprise.beta.gouv.fr/démarches-embauche \ No newline at end of file diff --git a/source/sites/mycompanyinfrance.fr/sitemap.txt b/source/sites/mycompanyinfrance.fr/sitemap.txt deleted file mode 100644 index 5d4a563cc..000000000 --- a/source/sites/mycompanyinfrance.fr/sitemap.txt +++ /dev/null @@ -1,21 +0,0 @@ -https://mycompanyinfrance.fr -https://mycompanyinfrance.fr/company/legal-status -https://mycompanyinfrance.fr/company/legal-status/number-of-associates -https://mycompanyinfrance.fr/company/legal-status/director-status -https://mycompanyinfrance.fr/company/legal-status/liability -https://mycompanyinfrance.fr/company/legal-status/minority-director -https://mycompanyinfrance.fr/company/legal-status/micro-enterprise -https://mycompanyinfrance.fr/company/legal-status/list -https://mycompanyinfrance.fr/company/create-micro-enterprise -https://mycompanyinfrance.fr/company/create-EI -https://mycompanyinfrance.fr/company/create-EIRL -https://mycompanyinfrance.fr/company/create-EURL -https://mycompanyinfrance.fr/company/create-SA -https://mycompanyinfrance.fr/company/create-SARL -https://mycompanyinfrance.fr/company/create-SAS -https://mycompanyinfrance.fr/company/create-SASU -https://mycompanyinfrance.fr/company/create-SNC -https://mycompanyinfrance.fr/company/after-registration -https://mycompanyinfrance.fr/company/find -https://mycompanyinfrance.fr/social-security -https://mycompanyinfrance.fr/hiring-process diff --git a/source/webpack.common.js b/source/webpack.common.js index 95db28282..e7ce6ec3e 100644 --- a/source/webpack.common.js +++ b/source/webpack.common.js @@ -18,8 +18,10 @@ module.exports = { } }, entry: { - infrance: ['./source/sites/mycompanyinfrance.fr/entry.js'], + infrance: ['./source/sites/mycompanyinfrance.fr/entry.en.js'], + 'mon-entreprise': ['./source/sites/mycompanyinfrance.fr/entry.fr.js'], embauche: ['./source/sites/embauche.gouv.fr/entry.js'], + // To not introduce breaking into the iframe integration, we serve simulateur.js from a 'dist' subdirectory 'dist/simulateur': ['./source/sites/embauche.gouv.fr/iframe-script.js'] }, @@ -99,6 +101,15 @@ module.exports = { "Simulation du prix d'une embauche en France et calcul du salaire net à partir du brut : CDD, statut cadre, cotisations sociales, retraite...", filename: 'embauche.html' }), + new HTMLPlugin({ + template: 'index.html', + chunks: ['mon-entreprise'], + title: + 'Mon-entreprise : Un guide pas à pas pour créer une entreprise en France', + description: + 'Du status juridique à premier embauche, vous trouverez ici toutes les ressources nécessaires pour démarrer votre activité.', + filename: 'mon-entreprise.html' + }), new CopyPlugin([ './manifest.webmanifest', './source/sites/embauche.gouv.fr/images/logo', @@ -111,8 +122,13 @@ module.exports = { to: 'robots.infrance.txt' }, { - from: './source/sites/mycompanyinfrance.fr/sitemap.txt', - to: 'sitemap.infrance.txt' + from: './source/sites/mycompanyinfrance.fr/sitemap.fr.txt', + to: 'sitemap.infrance.fr.txt' + }, + + { + from: './source/sites/mycompanyinfrance.fr/sitemap.en.txt', + to: 'sitemap.infrance.en.txt' } ]) ] diff --git a/source/webpack.prod.js b/source/webpack.prod.js index 6c21e5cfe..21f5e597a 100644 --- a/source/webpack.prod.js +++ b/source/webpack.prod.js @@ -79,7 +79,8 @@ module.exports = { /.*\?s=.*$/, /^\/stats/, /^\/robots\.txt$/, - /^\/sitemap\.infrance\.txt$/ + /^\/sitemap\.infrance\.fr\.txt$/, + /^\/sitemap\.infrance\.en\.txt$/ ] }), new PrerenderSPAPlugin({ @@ -88,6 +89,12 @@ module.exports = { routes: ['/', '/social-security'], indexPath: path.resolve('dist', 'infrance.html') }), + new PrerenderSPAPlugin({ + ...prerenderConfig(), + outputDir: path.resolve('dist', 'prerender', 'mon-entreprise'), + routes: ['/', '/sécurité-sociale'], + indexPath: path.resolve('dist', 'mon-entreprise.html') + }), new PrerenderSPAPlugin({ ...prerenderConfig(), outputDir: path.resolve('dist', 'prerender', 'embauche'),