Coder Social home page Coder Social logo

jintonic.github.io's Introduction

Source code of http://physino.xyz that can be converted to static web pages using Jekyll.

Docker

The website can be served locally through Docker:

git clone [email protected]:jintonic/jintonic.github.io.git physino.xyz
cd physino.xyz
# run docker desktop before running the following commands
docker compose up

Now one can open http://localhost:4000 in a browser and see the locally generated website.

Ref.

Docker image

The Docker image used to serve the website locally is generated using the following commands:

git clone [email protected]:jintonic/jintonic.github.io.git physino.xyz
cd physino.xyz
# run docker desktop before running the following commands
# build image based on ./Dockerfile
docker-compose build
# push container to hub.docker.com
docker-compose push

The Dockerfile contains only two lines:

from jekyll/minimal:pages
run gem cleanup && gem install webrick

The official jekyll/minimal:pages image doesn't include the webrick gem, which provides an http server. Without it, I can run jekyll build, but not jekyll serve. I can install it using bundler for a specific ruby application or using gem install webrick for the whole Docker image. As this Docker image is created for the sole purpose of serving this website locally, there is no need to use bundler anymore. Besides, bundle install webrick not only installs webrick, but also install a bunch of other gems in different versions from the ones installed by gem. Jekyll gets confused by those different versions of gems. The difference between bundle install and gem install is mentioned in the following posts:

The image generated is named physino/jekyll:pages in docker-compose.yml and shared on https://hub.docker.com/r/physino/jekyll.

Structure

Posts are categorized to sub directories

Banners for the categories are defined globally in _includes/banner.html.

Test

jekyll build
htmlproofer ./_site --only-4xx --check-html

License

https://creativecommons.org/publicdomain/zero/1.0/ Ref.: https://choosealicense.com/

To-do's

Limitation

  • jekyll-pagination only works in the index.html file, not index.md. jekyll-pagination-v2 does support pagination in any file, but does not work for GitHub pages. Currently, the pagination code is in blog/index.html. It does not work.

jintonic.github.io's People

Contributors

croakyyyy avatar jintonic avatar yyj398596791 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pramodach

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.