make site build in two languages
This commit is contained in:
parent
68c73b5fe2
commit
7f68a9d0ef
2 changed files with 15 additions and 9 deletions
|
|
@ -22,18 +22,29 @@ pages:
|
||||||
script:
|
script:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y zip
|
- apt-get install -y zip
|
||||||
|
# Build the default EN version
|
||||||
|
- sed -i "s/REPLACEME/butterbox/g" _data/deployment.yml
|
||||||
- bundle exec jekyll build -d public
|
- bundle exec jekyll build -d public
|
||||||
- cd public
|
- cd public
|
||||||
# Make a deployable zip based on this build.
|
- zip -r ../site-en.zip ./
|
||||||
- zip -r ../site.zip ./
|
- cd ..
|
||||||
|
- git restore .
|
||||||
|
# Build the ES version (in time this should be a single build with automated language switching)
|
||||||
|
- sed -i "" 's/^languages:.*/languages: ["es", "en"]/g' ../butter-box-ui/_config.yml
|
||||||
|
- sed -i "s/REPLACEME/comolamantequilla/g" _data/deployment.yml
|
||||||
|
- bundle exec jekyll build -d public
|
||||||
|
- cd public
|
||||||
|
- zip -r ../site-es.zip ./
|
||||||
# Now go build the site we actually want to deploy.
|
# Now go build the site we actually want to deploy.
|
||||||
- cd ..
|
- cd ..
|
||||||
|
- git restore .
|
||||||
# simulate the drive being inserted
|
# simulate the drive being inserted
|
||||||
- mv simulated-usb-butter usb-butter
|
- mv simulated-usb-butter usb-butter
|
||||||
- "sed -i 's/^baseurl.*/baseurl: \"\\/butter-box-ui\"/' _config.yml"
|
- "sed -i 's/^baseurl.*/baseurl: \"\\/butter-box-ui\"/' _config.yml"
|
||||||
- bundle exec jekyll build -d public
|
- bundle exec jekyll build -d public
|
||||||
# Now move the zip into the public dir so it gets served.
|
# Now move the zip into the public dir so it gets served.
|
||||||
- mv ./site.zip ./public/site.zip
|
- mv ./site-en.zip ./public/site-en.zip
|
||||||
|
- mv ./site-es.zip ./public/site-es.zip
|
||||||
- pwd
|
- pwd
|
||||||
- ls -la .
|
- ls -la .
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,7 @@ twitter_username: Butter App
|
||||||
github_username: Butter App
|
github_username: Butter App
|
||||||
logo: "/assets/images/butter-app-logo-small.svg"
|
logo: "/assets/images/butter-app-logo-small.svg"
|
||||||
# powered by jekyll-multiple-languages-plugin
|
# powered by jekyll-multiple-languages-plugin
|
||||||
# During install, one row will be removed and the placeholder will be replaced with that code.
|
languages: ['en', 'es']
|
||||||
languages: [
|
|
||||||
'en',
|
|
||||||
'es',
|
|
||||||
'zh_Hans',
|
|
||||||
]
|
|
||||||
|
|
||||||
exclude: ["public", "Gemfile", "Gemfile.lock", "node_modules", "test"]
|
exclude: ["public", "Gemfile", "Gemfile.lock", "node_modules", "test"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue