Comments (6)
I will note that I am not using jekyll serve in order to serve the site - I am using nginx in a docker container. So you may need a few more dependencies than I listed, but I noticed several other unnecessary themes were being installed. It is probably best to list the dependencies explicitly. 😃
from type-theme.
Thanks for bringing this up.
For development purposes, I'd prefer to keep my environment in sync with GitHub Pages, since this is where this theme is mostly used.
Context: I started looking into reducing the dependencies that are installed because I was tired of waiting for lengthy builds to complete.
Have you considered creating your own Docker image, which you can upload or build using a service like Docker Hub, with the dependencies pre-installed?
from type-theme.
Certainly - I appreciate your speedy response.
I completely understand where you are coming from.
Have you considered creating your own Docker image, which you can upload or build using a service like Docker Hub, with the dependencies pre-installed?
A similar solution has crossed my mind. I plan on investigating a solution like that at some point, but my initial research makes me think it will be somewhat complex.
I sort of wish that the Jekyll build step (or bundle install) could be broken into two steps, 1 for installing dependencies and one for rendering the Jekyll site (templates and stuff) because then I could take advantage of docker caching. I do think this is possible, but again, my limited knowledge of Jekyll makes it seem complex.
from type-theme.
A similar solution has crossed my mind. I plan on investigating a solution like that at some point, but my initial research makes me think it will be somewhat complex.
Have a look at using a Dockerfile
, it's likely only a couple lines of configuration to set-up (examples).
If you're using Docker Hub, you can also set it to automatically build and upload the image for you whenever you push to the repo with the Dockerfile
.
I sort of wish that the Jekyll build step (or bundle install) could be broken into two steps, 1 for installing dependencies and one for rendering the Jekyll site (templates and stuff) because then I could take advantage of docker caching. I do think this is possible, but again, my limited knowledge of Jekyll makes it seem complex.
Does bundle install
then jekyll build
not work?
from type-theme.
I appreciate the suggestion with Dockerhub - I actually have a private registry set up so I may do something like that...
Does bundle install then jekyll build not work?
I hadn't tried that.... it totally works! Thank you for the suggestion!
My builds were 50+ seconds. Now they are less than 30 seconds thanks to docker caching (of course the very first build takes a little longer) - I am very happy with that. 🎉
This is my current Dockerfile,
# Stage 1
FROM jekyll/jekyll as jekyll
WORKDIR /app
COPY Gemfile .
RUN chown -R jekyll:jekyll /app
RUN bundle install
COPY . .
RUN chown -R jekyll:jekyll /app
RUN jekyll build --trace
# Stage 2
FROM nginx
COPY --from=jekyll /app/_site /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
from type-theme.
Great! Glad to hear that worked.
from type-theme.
Related Issues (20)
- A question about _config.yml site.url
- Change size of header_text_feature_image HOT 5
- Ship theme as a gem HOT 2
- Subtitles HOT 3
- kramdown and KaTeX conflict HOT 2
- Your theme is listed in jekyllthemes.ru
- Add Search Support HOT 3
- Responsiveness HOT 2
- Uncaught SyntaxError: Invalid shorthand property initializer HOT 3
- DEPRECATION WARNING for a.button:hover HOT 1
- Extending a compound selector is deprecated HOT 1
- Gem version / GitHub Pages remote_theme support HOT 8
- GitHub Pages: The page build completed successfully, but returns error HOT 4
- gh-pages is out of sync with master HOT 1
- Double bottom rule when using comments HOT 1
- Install on Windows HOT 1
- Search is not working other than English HOT 1
- Fresh fork does not work HOT 1
- Type theme is not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from type-theme.