👽 ajoute un nouveau nom de domaine pour le site en francais
- 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'envpull/418/head
parent
1c7699a2a1
commit
a06bc7d07c
63
netlify.toml
63
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}"
|
|
@ -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}}</1>
|
||||
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
|
||||
|
|
|
@ -92,6 +92,7 @@ const LEGAL_STATUS_DETAILS: { [status: string]: CompanyLegalStatus } = {
|
|||
}
|
||||
|
||||
export type LegalStatus = $Keys<typeof LEGAL_STATUS_DETAILS>
|
||||
|
||||
const QUESTION_LIST: Array<Question> = Object.keys(
|
||||
LEGAL_STATUS_DETAILS['SARL (minority director)']
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
)
|
||||
|
||||
|
|
|
@ -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 (
|
||||
<Provider
|
||||
basename="infrance"
|
||||
language="fr"
|
||||
basename={this.props.basename}
|
||||
language={this.props.language}
|
||||
tracker={tracker}
|
||||
reduxMiddlewares={middlewares}
|
||||
initialStore={{ ...retrievePersistedState(), lang: 'en' }}
|
||||
|
@ -89,6 +90,9 @@ let RouterSwitch = translate()(() => {
|
|||
path={paths.démarcheEmbauche.index}
|
||||
component={HiringProcess}
|
||||
/>
|
||||
{process.env.NODE_ENV !== 'production' && (
|
||||
<Route exact path="/sitemap" component={Sitemap} />
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
|
|
|
@ -4,4 +4,4 @@ import App from './App'
|
|||
|
||||
let anchor = document.querySelector('#js')
|
||||
|
||||
render(<App />, anchor)
|
||||
render(<App language="en" basename="infrance" />, anchor)
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
import App from './App'
|
||||
|
||||
let anchor = document.querySelector('#js')
|
||||
|
||||
render(<App language="fr" basename="mon-entreprise" />, anchor)
|
|
@ -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 } }) => (
|
||||
<div className="footer-container">
|
||||
<PageFeedback blacklist={feedbackBlacklist} />
|
||||
<footer className="footer" style={{ backgroundColor: `${colour}22` }}>
|
||||
<div className="ui__ container">
|
||||
<div id="footerIcons">
|
||||
<a href="https://www.urssaf.fr">
|
||||
<img src={urssafSvg} alt="un service fourni par l'URSSAF" />
|
||||
</a>
|
||||
<a href="https://beta.gouv.fr">
|
||||
<img
|
||||
src={betaGouvSvg}
|
||||
alt="un service de l’Etat français incubé par beta.gouv.fr"
|
||||
/>
|
||||
</a>
|
||||
const Footer = ({ colours: { colour } }) => {
|
||||
const hrefLink =
|
||||
hrefLangLink[i18n.language][
|
||||
decodeURIComponent(window.location.pathname).replace(/^\/$/, '')
|
||||
] || []
|
||||
return (
|
||||
<div className="footer-container">
|
||||
<Helmet>
|
||||
{hrefLink.map(({ href, hrefLang }) => (
|
||||
<link
|
||||
key={hrefLang}
|
||||
rel="alternate"
|
||||
hrefLang={hrefLang}
|
||||
href={href}
|
||||
/>
|
||||
))}
|
||||
</Helmet>
|
||||
<PageFeedback blacklist={feedbackBlacklist} />
|
||||
<footer className="footer" style={{ backgroundColor: `${colour}22` }}>
|
||||
<div className="ui__ container">
|
||||
<div id="footerIcons">
|
||||
<a href="https://www.urssaf.fr">
|
||||
<img src={urssafSvg} alt="un service fourni par l'URSSAF" />
|
||||
</a>
|
||||
<a href="https://beta.gouv.fr">
|
||||
<img
|
||||
src={betaGouvSvg}
|
||||
alt="un service de l’Etat français incubé par beta.gouv.fr"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<p className="ui__ notice">
|
||||
<Trans i18nKey="piedDePage">
|
||||
Ce site est développé par l'
|
||||
<a href="https://www.urssaf.fr">URSSAF</a> et{' '}
|
||||
<a href="https://beta.gouv.fr">beta.gouv.fr</a>.
|
||||
</Trans>
|
||||
</p>
|
||||
<p className="ui__ notice" style={{ textAlign: 'center' }}>
|
||||
<LegalNotice />
|
||||
{' • '}
|
||||
<Privacy />
|
||||
{!!hrefLink.length && ' • '}
|
||||
{hrefLink.map(({ hrefLang, href }) => (
|
||||
<a
|
||||
href={href}
|
||||
key={hrefLang}
|
||||
style={{ textDecoration: 'underline' }}>
|
||||
{hrefLang === 'fr' ? (
|
||||
<> Passer en français {emoji('🇫🇷')}</>
|
||||
) : hrefLang === 'en' ? (
|
||||
<> Switch to english {emoji('🇬🇧')}</>
|
||||
) : (
|
||||
hrefLang
|
||||
)}
|
||||
</a>
|
||||
))}
|
||||
</p>
|
||||
</div>
|
||||
<p className="ui__ notice">
|
||||
<Trans i18nKey="piedDePage">
|
||||
Ce site est développé par l'
|
||||
<a href="https://www.urssaf.fr">URSSAF</a> et{' '}
|
||||
<a href="https://beta.gouv.fr">beta.gouv.fr</a>.
|
||||
</Trans>
|
||||
</p>
|
||||
<p className="ui__ notice" style={{ textAlign: 'center' }}>
|
||||
<LegalNotice />
|
||||
{' • '}
|
||||
<Privacy />
|
||||
{' • '}
|
||||
<LangSwitcher />
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default compose(
|
||||
withRouter,
|
||||
withColours,
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
|
||||
export default () => (
|
||||
<>
|
||||
<h1>404</h1>
|
||||
<p>{emoji('🙅')} La page que vous cherchez n'existe pas / plus</p>
|
||||
</>
|
||||
)
|
|
@ -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 <Page404 />
|
||||
}
|
||||
return (
|
||||
<Animate.fromBottom>
|
||||
<Helmet>
|
||||
<title>
|
||||
{t(['entreprise.tâches.page.titre', 'Créer une {{companyStatus}}'], {
|
||||
companyStatus
|
||||
companyStatus: t(companyStatus)
|
||||
})}
|
||||
</title>
|
||||
<meta
|
||||
|
@ -57,13 +59,15 @@ const CreateCompany = ({
|
|||
'entreprise.tâches.page.description',
|
||||
`Une liste complète des démarches à faire pour vous aider à créer une {{companyStatus}} auprès de l'administration française.`
|
||||
],
|
||||
{ companyStatus }
|
||||
{ companyStatus: t(companyStatus) }
|
||||
)}
|
||||
/>
|
||||
</Helmet>
|
||||
<Scroll.toTop />
|
||||
<h1>
|
||||
<T k="entreprise.tâches.titre">Créer une {{ companyStatus }}</T>
|
||||
<T k="entreprise.tâches.titre">
|
||||
Créer une {{ companyStatus: t(companyStatus) }}
|
||||
</T>
|
||||
</h1>
|
||||
{!statusChooserCompleted && (
|
||||
<>
|
||||
|
@ -76,28 +80,21 @@ const CreateCompany = ({
|
|||
</button>
|
||||
</p>
|
||||
<p>
|
||||
<StatusDescription companyStatus={companyStatus} />
|
||||
<StatusDescription status={companyStatus} />
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
<p>
|
||||
<T k="entreprise.tâches.intro">
|
||||
Voici la liste des tâches nécessaires pour créer votre
|
||||
</T>
|
||||
|
||||
{companyStatus}.
|
||||
</p>
|
||||
<h2 style={{ fontSize: '1.5rem' }}>
|
||||
<T k="entreprise.tâches.titre1">Pour créer votre société</T>
|
||||
</h2>
|
||||
<Checklist
|
||||
key={companyStatus}
|
||||
onInitialization={items =>
|
||||
onChecklistInitialization(companyStatus || '', items)
|
||||
onChecklistInitialization(companyStatus, items)
|
||||
}
|
||||
onItemCheck={onItemCheck}
|
||||
defaultChecked={companyCreationChecklist}>
|
||||
{!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && (
|
||||
{!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && (
|
||||
<CheckItem
|
||||
name="corporateName"
|
||||
title={
|
||||
|
@ -139,7 +136,7 @@ const CreateCompany = ({
|
|||
</p>
|
||||
}
|
||||
/>
|
||||
{companyStatus !== 'micro-enterprise' && (
|
||||
{companyStatus !== 'micro-entreprise' && (
|
||||
<CheckItem
|
||||
name="companyAddress"
|
||||
title={
|
||||
|
@ -162,7 +159,7 @@ const CreateCompany = ({
|
|||
}
|
||||
/>
|
||||
)}
|
||||
{!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && (
|
||||
{!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && (
|
||||
<CheckItem
|
||||
name="companyStatus"
|
||||
title={
|
||||
|
@ -246,7 +243,7 @@ const CreateCompany = ({
|
|||
}
|
||||
/>
|
||||
)}
|
||||
{!['EI', 'EIRL', 'micro-enterprise'].includes(companyStatus) && (
|
||||
{!['EI', 'EIRL', 'micro-entreprise'].includes(companyStatus) && (
|
||||
<CheckItem
|
||||
title={
|
||||
<T k="entreprise.tâches.journal.titre">
|
||||
|
|
|
@ -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 }) => (
|
||||
<Link to={sitePaths().entreprise.créer(status)} className="ui__ button">
|
||||
<T>Créer une</T> {status}
|
||||
<T>Créer une</T> {t(status)}
|
||||
</Link>
|
||||
)
|
||||
))
|
||||
|
||||
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']) && (
|
||||
<li>
|
||||
<strong><T>Micro-enterprise</T>{language === 'fr' && ' '}: </strong>
|
||||
<StatusDescription status="micro-enterprise" />
|
||||
<strong><T>Micro-enterprise</T>{language === 'fr' && ' (auto-entrepreneur) '}: </strong>
|
||||
<StatusDescription status="micro-entreprise" />
|
||||
<br />
|
||||
<StatusButton status="micro-enterprise" history={history} />
|
||||
<StatusButton status="micro-entreprise" history={history} />
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
|
|
|
@ -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).
|
||||
</T>
|
||||
) : status.toLowerCase().includes('micro-enterprise') ? (
|
||||
) : status.includes('micro-entreprise') ? (
|
||||
<T k="formeJuridique.micro">
|
||||
La micro-entreprise est une entreprise individuelle, soumise à un régime
|
||||
forfaitaire pour le calcul des impôts et le paiement des cotisations de
|
||||
|
|
|
@ -198,7 +198,7 @@ const HiringProcess = ({
|
|||
</li>
|
||||
<li>Remettre la fiche de paie à votre employé</li>
|
||||
</ul>
|
||||
<Link className="ui__ button" to={sitePaths().sécuritéSociale.simulation}>
|
||||
<Link className="ui__ button" to={sitePaths().sécuritéSociale + '/simulation'}>
|
||||
Obtenir un exemple de fiche de paie
|
||||
</Link>
|
||||
</T>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import React from 'react'
|
||||
import sitePaths, { generateSiteMap } from '../sitePaths'
|
||||
const SiteMap = () => (
|
||||
<>
|
||||
<h1>Sitemap</h1>
|
||||
<pre>
|
||||
{generateSiteMap(sitePaths()).map(path => (
|
||||
<span key={path}>
|
||||
{path}
|
||||
<br />
|
||||
</span>
|
||||
))}
|
||||
</pre>
|
||||
</>
|
||||
)
|
||||
|
||||
export default SiteMap
|
|
@ -32,7 +32,7 @@ class SocialSecurity extends Component<Props, {}> {
|
|||
<ScrollToTop />
|
||||
<Animate.fromBottom>
|
||||
{this.props.match.isExact && (
|
||||
<T k="sécu">
|
||||
<T k="sécu.content">
|
||||
<h1>Protection sociale : coût et avantages</h1>
|
||||
<p>
|
||||
La France a choisi d'offrir à ses citoyens une protection
|
||||
|
|
|
@ -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<LegalStatus> = [
|
||||
'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' }]))
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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'
|
||||
}
|
||||
])
|
||||
]
|
||||
|
|
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue