jekyll doc theme
1.0.0
ไปที่เว็บไซต์เพื่อดูข้อมูลโดยละเอียดและการสาธิต
คุณต้องมี Ruby และ gem ก่อนเริ่ม จากนั้น:
# install bundler
gem install bundler
# clone the project
git clone https://github.com/aksakalli/jekyll-doc-theme.git
cd jekyll-doc-theme
# install dependencies
bundle install
# run jekyll with dependencies
bundle exec jekyll serve
ในการย้ายเพื่อรองรับ Github Pages ไฟล์จำนวนหนึ่งได้ถูกย้ายไปยังโฟลเดอร์ /asset
หรือคุณสามารถปรับใช้โดยใช้ Dockerfile แบบหลายขั้นตอนที่ให้บริการไฟล์จาก Nginx เพื่อประสิทธิภาพที่ดีขึ้นในการผลิต
สร้างภาพสำหรับ JEKYLL_BASEURL
ของเว็บไซต์ของคุณ :
docker build --build-arg JEKYLL_BASEURL="/your-base/url" -t jekyll-doc-theme .
(หรือปล่อยว่างไว้สำหรับ root: JEKYLL_BASEURL=""
) และให้บริการ:
docker run -p 8080:80 jekyll-doc-theme
ธีมนี้ยังมีให้ใช้งานบนหน้า Github โดยใช้ปลั๊กอินธีมระยะไกล:
เจมไฟล์
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
_config.yml
# Configure the remote_theme plugin with the gh-pages branch
# or the specific tag
remote_theme: aksakalli/jekyll-doc-theme@gh-pages
ไฟล์จากโปรเจ็กต์ของคุณจะแทนที่ไฟล์ธีมใดๆ ที่มีชื่อเดียวกัน ตัวอย่างเช่น กรณีการใช้ความคิดเห็นส่วนใหญ่สำหรับสิ่งนี้คือการปรับเปลี่ยนธีมหรือสีของไซต์ของคุณ เมื่อต้องการทำเช่นนี้ ควรดำเนินการขั้นตอนต่อไปนี้:
aksakalli/jekyll-doc-theme/asset/css/main.scss
ไปยังโปรเจ็กต์ของคุณเอง (การรักษาโครงสร้างโฟลเดอร์) // Bootstrap variable overrides
$grid-gutter-width: 30px !default;
$container-desktop: (900px + $grid-gutter-width) !default;
$container-large-desktop: (900px + $grid-gutter-width) !default;
@import // Original import statement
{% if site.bootwatch %}
"bootswatch/{{site.bootwatch | downcase}}/variables",
{% endif %}
"bootstrap",
{% if site.bootwatch %}
"bootswatch/{{site.bootwatch | downcase}}/bootswatch",
{% endif %}
"syntax-highlighting",
"typeahead",
"jekyll-doc-theme"
;
// More custom overrides.
เผยแพร่ภายใต้ใบอนุญาต MIT