### Install mkdocs public version Source: https://github.com/flipperdevices/docs/blob/master/README.md Install the public version of mkdocs. ```bash pip3 install mkdocs-material mkdocs-macros-plugin mkdocs-git-revision-date-localized-plugin mkdocs-smart-meta-plugin ``` -------------------------------- ### Install dfu-util on macOS Source: https://github.com/flipperdevices/docs/blob/master/en/content/usage/general/flashing-firmware.md Installs Homebrew if not present, then installs dfu-util using Homebrew. ```sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ```sh brew install dfu-util ``` -------------------------------- ### Install dfu-util on Arch Source: https://github.com/flipperdevices/docs/blob/master/en/content/usage/general/flashing-firmware.md Installs dfu-util using pacman. ```sh sudo pacman -Sy dfu-util ``` -------------------------------- ### Install dfu-util on Ubuntu/Debian Source: https://github.com/flipperdevices/docs/blob/master/en/content/usage/general/flashing-firmware.md Installs dfu-util using apt-get. ```sh sudo apt-get install dfu-util ``` -------------------------------- ### Install mkdocs insiders version Source: https://github.com/flipperdevices/docs/blob/master/README.md Install the insiders version of mkdocs if you have a token. ```bash pip3 install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git pip3 install mkdocs-macros-plugin mkdocs-git-revision-date-localized-plugin mkdocs-smart-meta-plugin ``` -------------------------------- ### Install dfu-util on Fedora Source: https://github.com/flipperdevices/docs/blob/master/en/content/usage/general/flashing-firmware.md Installs dfu-util using yum. ```sh sudo yum install dfu-util ``` -------------------------------- ### Build dfu-util from source Source: https://github.com/flipperdevices/docs/blob/master/ru/content/usage/general/flashing-firmware.md Link to instructions for building dfu-util from source. ```html dfu-util always can be [built from source](http://dfu-util.sourceforge.net/build.html). ``` -------------------------------- ### Run local mkdocs server Source: https://github.com/flipperdevices/docs/blob/master/README.md Run the mkdocs server locally to render changes on the fly. ```bash python3 ./serve.py ``` -------------------------------- ### Connecting to CLI via screen Source: https://github.com/flipperdevices/docs/blob/master/ru/content/development/firmware/cli.md Command to connect to the Flipper Zero's CLI using the 'screen' utility on macOS. ```bash screen /dev/tty.usbmodem2069315E544E1 ``` -------------------------------- ### Upload firmware using dfu-util Source: https://github.com/flipperdevices/docs/blob/master/en/content/usage/general/flashing-firmware.md Command to upload the firmware file using dfu-util. ```sh dfu-util -a 0 -D full.dfu ``` -------------------------------- ### Home Menu Template Source: https://github.com/flipperdevices/docs/blob/master/en/content/index.md This snippet shows the Jinja2 template used to render the home menu, iterating through navigation items and displaying titles and links. ```html
``` -------------------------------- ### Embedding a Video Source: https://github.com/flipperdevices/docs/blob/master/README.md Use this macro to embed a video. ```markdown {{ video("/assets/example-video-file-name.mp4") }} ``` -------------------------------- ### Embedding a GIF Source: https://github.com/flipperdevices/docs/blob/master/README.md Use this macro to embed a GIF (autoplayable silent MP4 video). ```markdown {{ gif("/assets/example-gif-file-name.mp4") }} ``` -------------------------------- ### Embedding a Flipper Zero Screenshot Source: https://github.com/flipperdevices/docs/blob/master/README.md Use this macro to embed a Flipper Zero screenshot. The screenshot should be 128*64 PNG with a transparent background. ```markdown {{ screenshot("/assets/example-screenshot.png") }} ``` -------------------------------- ### Disqus JavaScript Configuration Source: https://github.com/flipperdevices/docs/blob/master/shared/overrides/partials/integrations/disqus.html This snippet shows the JavaScript configuration object for initializing Disqus comments on the page. It includes settings for the host, site ID, components, and locale. ```javascript var remark_config = { host: "https://comments.flipperzero.one", site_id: '{{ remark }}', components: ['embed'], max_shown_comments: 20, locale: '{{ config.theme.language }}', show_email_subscription: false }; (function(c) { for(var i = 0; i < c.length; i++){ var d = document, s = d.createElement('script'); s.src = remark_config.host + '/web/' +c[i] +'.js'; s.defer = true; (d.head || d.body).appendChild(s); } })(remark_config.components || ['embed']); ``` -------------------------------- ### Jinja Template Override Source: https://github.com/flipperdevices/docs/blob/master/shared/overrides/main.html This snippet shows how to override the base.html template in Jinja to set the page title and description based on metadata or page properties. ```html {% extends "base.html" %} {% block extrahead %} {% set title = config.site_name %} {% if page and page.meta and page.meta.title %} {% set title = page.meta.title %} {% elif page and page.title and not page.is_homepage %} {% set title = page.title | striptags %} {% endif %} {% if page and page.meta and page.meta.description %} {% set description = page.meta.description %} {% elif page and page.meta and page.meta.smart_description %} {% set description = page.meta.smart_description %} {% endif %} {% if description %} {% endif %} {% if page and page.meta and page.meta.image %} {% set image = page.meta.image %} {% elif page and page.meta and page.meta.smart_image %} {% set image = page.meta.smart_image %} {% endif %} {% if image %} {% endif %} {% endblock %} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.