Coder Social home page Coder Social logo

eikeime / marlindocumentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marlinfirmware/marlindocumentation

0.0 1.0 0.0 11.37 MB

Marlin Firmware Documentation Project

Home Page: http://marlinfw.org

License: GNU General Public License v3.0

Ruby 18.40% HTML 53.18% CSS 18.04% JavaScript 10.38%

marlindocumentation's Introduction

Marlin Documentation Project

Build Status

The aim of this project is to provide clear and concise documentation for Marlin 3D printer firmware. This documentation is made open and available on Github so anyone is welcome to contribute by either completing, correcting or creating new articles. See the section below, "What We Need Most," for a current list of... what we need most.

Marlin logo

Be safe, have fun and build all the things!

Technical details

The Marlin Documentation Project is built using the following technologies:

How to contribute

To work with the documentation, first you need to make a Fork of this repository in your own Github account, then locally clone your MarlinDocumentation fork. You should do all work within your own fork before submitting it to us. You can use Github's "Open in Desktop" option, or from your own desktop open a terminal/cmd window and do:

  • cd C:\ (for example)
  • git clone https://github.com/MarlinFirmware/MarlinDocumentation.git

This will create a local C:\MarlinDocumentation folder linked to your fork.

To add new documentation or edit existing documentation, start by creating a new branch as a copy of the 'master' branch. You can do this using the Github web interface, from within Github Desktop, or from the command line.

If your new document is about "mashed potatoes" then name the new branch accordingly:

git checkout master -b doc-mashed_potatoes

Inside the _docs folder add the new file mashed-potatoes.md and let flow all your creativity into it. When you feel your masterpiece is ready to be shared with the world, commit the changes and push them up to your fork of MarlinDocumentation, then start a new Pull Request to the upstream repository (MarlinFirmware/MarlinDocumentation). This is done most easily from within the Github Desktop app. Please read Github's documentation on managing branches and creating Pull Requests if you're not sure how to proceed.

git add mashed-potatoes.md
git commit -m "Added a new document about potatoes"
git push

Coding style

The preferred format for new document contribution is Markdown language. With this format you must be careful, because small typos can cause Jekyll to reject the page. If you've installed Jekyll as described below, your local auto-building Jekyll server will tell you where your errors are.

Editorial style

Try to be neutral, concise, and straightforward. Avoid use of personal pronouns, unless avoiding them proves awkward. Provide images and give examples where needed. Check your spelling, grammar, and punctuation.

What we need most

  1. Transfer documents from the old Marlin wiki into the new site.
  2. Transfer descriptions of the options in Configuration.h and Configuration_adv.h to the new system.
  3. Create "Getting Started" guides to ease the Marlin learning curve for new users.
  4. Document all supported GCodes with notes specific to Marlin.

Going Deeper

If you'd like to be able to preview your contributions before submitting them, you'll need to install Jekyll on your system. Instructions are given below. As this is a non-trivial process, we recommend reading one of the following tutorials for a quick start with Jekyll:

Installing buildroot on Windows

  1. Get Ruby for Windows (32 bit, 64bit), execute the installer and go through the steps of the installation, make sure to check the “Add Ruby executables to your PATH” box.
  2. Get Ruby Devkit (32 bit, 64bit), the download is a self-extracting archive. When you execute the file, it’ll ask you for a destination for the files. Enter a path that has no spaces in it. We recommend something simple, like C:\RubyDevKit\ . Click Extract and wait until the process is finished.
  3. Open your favorite command line tool and do:
  • cd C:\RubyDevKit
  • ruby dk.rb init
  • ruby dk.rb install
  • gem install bundler

Installing buildroot on macOS

Apple includes a version of Ruby with macOS, but it's too old to use with Jekyll. You'll need Ruby 2.3 or newer to proceed. You can use one of the package managers, Homebrew or MacPorts to install rbenv and ruby-build, which will then allow you to install Ruby 2.3. You may also install these manually without a package manager.

Don't install Ruby 2.3 itself using Homebrew or MacPorts, as this leads down a twisty rabbit hole. Just use rbenv. Note that rbenv is incompatible with rvm, so make sure to also remove any custom rvm you've installed before proceeding.

Once you have rbenv and ruby-build installed, follow the instructions on the rbenv project page to:

  • install a newer version of Ruby (2.3 or newer),
  • modify your .bash_profile with code to set your Ruby environment, and
  • create a local shims folder with $PATH pointing to your Ruby.

It sounds ugly, but hopefully the instructions on the rbenv project page are clear enough to get you that far.

With your Ruby environment set up and ready to go, you can now install the bundler Ruby gem with:

  • gem install bundler

Previewing content

Now that you have Jekyll installed, you can preview your changes exactly as they will appear on the final site. Just open a terminal/cmd window, use chdir or cd to change the working path to your local copy of the repository, and execute the following commands:

bundle install --path vendor/bundle
bundle exec jekyll serve --watch

You'll only need to execute the bundle install command once. It will make sure you have all the required Ruby gems installed. If you get errors at this stage, you may need to update your Ruby installation, fix your Ruby environment, or resolve dependencies between the Ruby gems.

With the serve option, Jekyll watches the local files and on every save triggers an automatic build of the site. It also runs a mini-webserver at http://localhost:4000/ so the documentation can be previewed in the browser right on your own computer.

Publishing changes

If you're a developer with enough access rights to publish changes to the gh-pages branch, the following bash script will ease your life by applying a consistent process for website publication. Run this from inside your local working copy of the repo.

pub-marlindoc.sh

#!/bin/bash
TMPFOLDER=$( mktemp -d )
COMMIT=$( git log --format="%H" -n 1 )

set -e

git reset --hard
git clean -d -f

# Uncomment to compress the final html files
#mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb

bundle install
bundle exec jekyll build --profile --trace --no-watch
bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/"

rsync -av _site/ ${TMPFOLDER}/

git reset --hard HEAD
git clean -d -f
git checkout gh-pages

rsync -av ${TMPFOLDER}/ ./

git add --all
git commit --message "Built from ${COMMIT}"
git push

rm -rf ${TMPFOLDER}

git checkout master

License

Marlin is published under the GPL license because we believe in open development. The GPL comes with both rights and obligations. Whether you use Marlin firmware as the driver for your open or closed-source product, you must keep Marlin open, and you must provide your compatible Marlin source code to end users upon request. The most straightforward way to comply with the Marlin license is to make a fork of Marlin on Github, perform your modifications, and direct users to your modified fork.

While we can't prevent the use of this code in products (3D printers, CNC, etc.) that are closed source or crippled by a patent, we would prefer that you choose another firmware or, better yet, make your own.

marlindocumentation's People

Contributors

thinkyhead avatar jbrazio avatar landodragon141 avatar bob-the-kuhn avatar roxy-3d avatar sarf2k4 avatar cabbagecreek avatar stigjoergensen avatar petrzjunior avatar paulusjacobus avatar fixoid avatar edwilliams16 avatar emadman avatar palantirwielder avatar shawnbuckley avatar pablogventura avatar nickduino avatar bionik avatar gibahc avatar benlye avatar token47 avatar nitso avatar

Watchers

 avatar

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.