MarlinFirmware/MarlinDocumentation
Tentang
Proyek dokumentasi Marlin Firmware
Pembelajaran dan pendidikanPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- +1
- dalam 15 hari
- +1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
Marlin Documentation Project
About
This repository contains the raw documentation for Marlin 3D printer firmware which is automatically deployed to marlinfw.org. This documentation is open and available on GitHub so anyone may contribute by completing, correcting, or creating articles.
Table of Contents
Technical details
The Marlin Documentation Project is built using the following technologies:
How to contribute
Fork this repository, create a branch, edit or add pages, run the checks, and open a Pull Request against
master. Before you start, read:
AGENTS.md: the repo map, how the site is organized, and the checks every change must pass.- Documentation Style Guide: voice, page structure, images, callouts, links.
_tools/README.md: the generators (Settings, G-code index, printer directory) and checks.skills/: step-by-step procedures for common tasks (new page, diagram, G-code page, settings regeneration), usable by people and by coding agents.
Reference sections (docs/settings/, the G-code index, the printer directory) are generated; edit the
human-owned fields or the page body, not the generated entries. Run _tools/install_hooks.sh once per clone so
the site checks run before every commit.
Local Jekyll preview
If you'd like to be able to preview your contributions before submitting them, you'll need to install Jekyll on your system. Instructions for Windows and macOS are given below:
Installing Ruby on Windows
Download and install a Ruby+Devkit
3.3.4from RubyInstaller Download Archives. Use default options for installation.Run the
ridk installstep on the last stage of the installation wizard. Choose option3forMSYS2 and MINGW development tool chain. This is needed for installing gems with native extensions. You can find additional information regarding this in the RubyInstaller Documentation.
[!TIP] Once the
MSYS2 and MINGW development toolchaininstall is complete, the installation wizard will reprompt which components should be installed. If you see a "Install MSYS2 and MINGW development toolchain succeeded" message above it, you can close the Command Prompt window and continue below.
Open a new Command Prompt so that changes to the
PATHenvironment variable become effective, then check that everything is working:ruby -vIf
ruby 3.3.4 (2024-07-09 revision be1089c8ec)is reported, then proceed to Set up the Marlin Documentation project.
Installing Ruby on macOS
[!NOTE] Ruby may come preinstalled, but macOS' "system Ruby" is outdated, unmaintained, and not recommended for general use.
There are many popular package managers for macOS, but we'll cover installation with Homebrew & MacPorts.
Install a package manager. You do not need to install both:
Install Homebrew by launching Terminal and running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install MacPorts by downloading & installing the correct package for your version of macOS from the Installing MacPorts page.
- Either Xcode or Command Line Tools for Xcode are required to install packages with MacPorts. You do not need to install both. These are available for free on Apple's Developer Program website. An Apple Developer Program membership is not required, but you will need to sign in with your Apple ID.
Install
chrubyandruby-install:Homebrew:
brew install chruby ruby-installMacPorts:
sudo port install chruby ruby-install
Install Ruby
3.3.4:ruby-install ruby 3.3.4The configure, build, and install process will take a few minutes.
Configure your shell to automatically use
chruby:Homebrew:
echo "" >> ~/.zshrc echo "# Ruby Configuration" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc echo "chruby ruby-3.3.4" >> ~/.zshrcMacPorts:
echo "" >> ~/.zshrc echo "# Ruby Configuration" >> ~/.zshrc echo "source ${prefix}/opt/local/share/chruby/chruby.sh" >> ~/.zshrc echo "source ${prefix}/opt/local/share/chruby/auto.sh" >> ~/.zshrc echo "chruby ruby-3.3.4" >> ~/.zshrc
Quit and relaunch Terminal, then check that everything is working:
ruby -vIt should report
ruby 3.3.4 (2024-07-09 revision be1089c8ec). If not, repeat the above steps.
[!NOTE] When using
ruby-installyou'll find your Ruby installations in~/.rubies/and you can switch between them withchruby. New instances ofzshin Terminal will default to 3.3.4 due to the changes made to~/.zshrc.
- Proceed to Set up the Marlin Documentation project. (Note that
bundleris already included.)
Installing Ruby on Ubuntu
Ensure APT is up to date:
sudo apt updateInstall prerequisites:
sudo apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-devInstall rbenv:
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrcInstall Ruby 3.3.4:
rbenv install 3.3.4 rbenv global 3.3.4
[!NOTE] When using
rbenvyou'll find your Ruby installations in~/.rbenv/versions/and you can switch between them withrbenv global <version>.
Check Ruby version:
ruby -vIt should report
ruby 3.3.4 (2024-07-09 revision be1089c8ec). If not, repeat the above steps.Add environment variables to your
~/.bashrcfile to configure the gem installation path:echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc source ~/.bashrcInstall Bundler Gem:
gem install bundlerProceed to Set up Marlin Documentation project.
Set up Marlin Documentation project
Once Ruby is installed, set up the Marlin Documentation project with Bundler. Open Command Prompt or Terminal and cd to the working path of your Marlin Documentation fork. Execute the following commands:
rm -f Gemfile.lock
bundle config set path 'vendor/bundle'
bundle install
[!NOTE] You only need to execute the above commands once to complete the install. If you see errors at this stage you may need to update your Ruby installation, fix your Ruby environment, or resolve dependencies between the Ruby gems.
Jekyll basics
Jekyll uses a combination of YAML, Markdown, Liquid, and HTML to define the site content and layout. A _config.yml file defines a site structure with "collections" corresponding to sub-folders. The website is "compiled" to produce static HTML and Javascript. The most important folders in the site are:
_layoutscontains the page templates (home, article, setting, gcode, tool)._includeshas partials included by the layouts.docs/<section>/holds the pages; each section has anindex.mdand child pages linked byparent:._tools/holds the generators and the checks. SeeAGENTS.mdfor the full map.
Previewing content
To start a mini web server and preview your changes, run the following command:
bundle exec jekyll serve --watch --incremental
With the serve --watch --incremental parameters, Jekyll watches local files for changes and triggers an automatic incremental build of the site on every save. It also starts a mini-web server so documentation can be previewed in a browser at http://localhost:4000/.
[!TIP] The main Marlin repository comes with the
mfdocscript containing the commands above as a shortcut to preview the documentation.
License
This documentation is licensed under the GPLv3 license.
Jelajahi proyek terkait
Memuat…