Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit

Permalink
Improving lighthouse ci testing 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
chicio committed Nov 16, 2019
1 parent f3fa38c commit 75eeca7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules
.idea
*.code-workspace
vendor/
.bundle/
.bundle/
.lighthouseci
13 changes: 10 additions & 3 deletions .lighthouserc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"ci": {
"collect": {
"numberOfRuns": 3,
"numberOfRuns": 1,
"staticDistDir": "./_site",
"startServerCommand": "npm start",
"url": "http://localhost:4000/"
"url": [
"http://localhost:4000/",
"http://localhost:4000/blog/"
]
},
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"uses-webp-images": "off"
"uses-optimized-images": "off",
"uses-webp-images": "off",
"uses-responsive-images": "off",
"unused-css-rules": "off",
"first-cpu-idle": "off"
}
},
"upload": {
Expand Down
2 changes: 1 addition & 1 deletion _includes/dependencies-js-blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
});
</script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_SVG"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_SVG"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script type="text/javascript" src="/assets/js/index.blog.min.js?rev=8fbd96347a3b5ec25c624bf508e0088f"></script>
<script type="text/javascript">
Expand Down
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<link rel="manifest" href="/manifest.json">
<link rel="preload" href="/assets/fonts/opensans/OpenSans-Regular.woff2" as="font" crossorigin="anonymous">
<link rel="prefetch" href="/blog/">
<link rel="preconnect" href="https://www.google-analytics.com">
{% include icons.html %}
{% include analytics.html %}
<style type="text/css">{% include {{ include.critical-css }} %}</style>
Expand Down
9 changes: 7 additions & 2 deletions _scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ rvm use 2.6.0
# Clean previous build
rm -Rf _site/

# Run pages-gem with bundler
bundle exec jekyll serve --host=0.0.0.0
# Run pages-gem with bundler.
# Add the parameter
# --host=0.0.0.0
# to be able to connect to the jekyll local instance from other device on the
# same network (e.g. your smartphone)
# See https://stackoverflow.com/questions/16608466/connect-to-a-locally-built-jekyll-server-using-mobile-devices-in-the-lan
bundle exec jekyll serve

0 comments on commit 75eeca7

Please sign in to comment.