diff --git a/.gitignore b/.gitignore index c9e7c5fa..93e9c046 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ output/* *#* .#* *~ +.bundle +.local +.bash_history +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..212a93e8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu + +RUN apt update + +RUN apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev -y + +# Install rbenv +RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv +RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh +RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh +RUN echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh +RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh +RUN chmod +x /etc/profile.d/rbenv.sh + +# install ruby-build +RUN mkdir /usr/local/rbenv/plugins +RUN git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build + +ENV RBENV_ROOT /usr/local/rbenv + +ENV PATH $RBENV_ROOT/bin:$RBENV_ROOT/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +ENV RUBY_VERSION 3.2.0 +RUN rbenv install $RUBY_VERSION +RUN rbenv global $RUBY_VERSION +ENV LANG C.UTF-8 + +RUN ruby -v + +RUN gem install bundler -v '2.4.1' +RUN bundle install \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..21ce9771 --- /dev/null +++ b/Gemfile @@ -0,0 +1,11 @@ +# frozen_string_literal: true +#ruby '3.2.0' +source "https://rubygems.org/" + +gem 'rake', '~> 13.0'# (13.0.6) +gem 'ultraviolet', '~> 1.0' +gem 'rdiscount', '~> 2.2' +gem 'builder', '~> 3.2' +gem 'wkhtmltopdf-binary' +gem 'pdfkit' + diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..3debe478 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,24 @@ +GEM + remote: https://rubygems.org/ + specs: + builder (3.2.4) + plist (3.6.0) + rake (13.0.6) + rdiscount (2.2.7) + textpow (1.4.0) + plist (>= 3.0.1) + ultraviolet (1.0.1) + textpow (>= 1.3.0) + +PLATFORMS + aarch64-linux + arm64-darwin-22 + +DEPENDENCIES + builder (~> 3.2) + rake (~> 13.0) + rdiscount (~> 2.2) + ultraviolet (~> 1.0) + +BUNDLED WITH + 2.4.1 diff --git a/README.md b/README.md new file mode 100644 index 00000000..282d1b07 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Git Community Book 中译本 + +图书在线阅读网址:https://gitbook.lkiuhui998.com + +原始仓库地址:https://github.com/schacon/gitbook + +作者: + +* [Scott Chacon](https://scottchacon.com/) + +* Emil Sit + +译者: + +* [Peter Liu](http://liuhui998.com) +* [Liu Wei](http://blog.liuw.name) + +* [Wendal](http://wendal.net) +* [Jiancong Guo](http://www.cbpm-gw.com) + + + + diff --git a/Rakefile b/Rakefile index 9d1b23b8..44d7762b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ -require 'script/merge' -require 'script/html' -require 'script/pdf' -require 'script/prince' \ No newline at end of file +require './script/merge' +require './script/html' +require './script/pdf' +require './script/pdf1' +require './script/prince' diff --git a/layout/book_index_template.html b/layout/book_index_template.html index 466b9b13..da03dfa0 100644 --- a/layout/book_index_template.html +++ b/layout/book_index_template.html @@ -105,37 +105,15 @@