octicons 0.2.0

A scalable set of icons handcrafted with <3 by GitHub ported for use in Rust.
Documentation
  • Coverage
  • 2.75%
    10 out of 363 items documented9 out of 11 items with examples
  • Size
  • Source code size: 98.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 9.39 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • YetAnotherMinion

Octicons in Rust

This is a library that will let you easily include svg octicons in your rust server side templates. The icons and their path data are exposed as static variables. Clone the statics and use the builder functions to configure the icon's attributes.

Install

  1. Add this to your Cargo.toml

    octicons = "0.1"
    
  2. Add the crate to your main.rs or lib.rs

    extern crate octicons;
    
  3. Use the static structs in your server side templates

    format!("{}",
        octicons::ARROW_DOWN.clone()
            .xmlns(Some("http://www.w3.org/2000/svg"))
            .width(32)
            .height(32)
            .fill(Some("#ff0"))
            .aria_label(Some("hi"))
            .class(Some("right left"))
    );
    

Documentation

Crate documentation can be found at docs.rs/octicons/

Publishing

If you have access to publish this repository, these are the steps to publishing. If you need access, contact #design-systems.

Before publishing This package relies on the data from octicons. To update to the most recent version, you'll need to run make prepare

  1. Update the CHANGELOG.md with relevant version number and any updates made to the repository.
  2. Update the version in Cargo.toml using the relevant version. The versioning is semver, so version appropriately based on what has changed.
  3. cargo package --allow-dirty Allow including the svg files needed by the build.rs
  4. cargo publish This will build the crate and publish it to crate.io.
  5. git push && git push --tags Push all these changes to origin.

License

(c) 2012-2017 GitHub, Inc.

When using the GitHub logos, be sure to follow the GitHub logo guidelines.

Font License: SIL OFL 1.1
Applies to all font files and SVG files

Code License: MIT
Applies to all other files