Giter VIP home page Giter VIP logo

website's Introduction

Mopidy website

This repo is the source for https://mopidy.com, hosted at GitHub Pages.

The documentation site, https://docs.mopidy.com, does not use this repo. It is based on the docs/ dir of the main Mopidy repo, and is hosted by Read The Docs.

Running locally

See the docs on Testing your GitHub Pages site locally with Jekyll.

Deploying changes

To update https://mopidy.com, make changes to the source, commit, and push to [email protected]:mopidy/website.git.

That's it.

Extension registry

This extension registry is a community effort, and will never be complete without your help.

To add or update an extension, use the existing extension definitions in the _ext/ directory for inspiration. Submit your update as a pull request on this repo.

The source files for the Mopidy extension registry can be found in the _ext/ directory. Any related images are in the media/ext/ directory.

The "front matter" part of the extension definitions is a YAML data structure with the following fields:

### Required fields:

title: Mopidy-Foo               # Name of extension
type: backend                   # One of "backend"/"frontend"/"mixer"/"web"

### Optional fields:

dev:                            # Development related fields
  github: mopidy/mopidy-foo         # GitHub repo
  circleci: true                    # Whether using CircleCI
  travisci: false                   # Whether using Travis CI
  codecov: true                     # Whether using Codecov code coverage
  coveralls: false                  # Whether using Coveralls code coverage

dist:                           # Distribution related fields:
  pypi: Mopidy-Foo                  # PyPI package name
  apt-debian: mopidy-foo            # Debian/Ubuntu package name
  apt-mopidy: mopidy-foo            # apt.mopidy.com package name
  arch-aur: mopidy-foo              # Arch Linux AUR package name
  fedora: mopidy-foo                # Fedora package name
  rpmfusion: mopidy-foo             # RPM Fusion package name
  homebrew:
    tap: mopidy/mopidy              # Homebrew tap name
    formula: mopidy-foo             # Homebrew formula name in above tap

logo: /media/ext/foo.png        # Logo, e.g. of the music service

images:                         # List of images of the extension in use
  - /media/ext/foo.jpg

service: FooBar                 # Name of the upstream service if any.

oauth:                          # OAuth integration for services that require tokens:
  endpoint: https://example.com     # Redirection endpoint to start OAuth flow
  origin: https://example.org       # Origin of callback page at end of OAuth flow
                                    # Defaults to endpoint's origin if not set
  button:                           # Styling for auth button
    style: background: ...              # Inline CSS to apply to button.
    logo:
      url:                              # URL to logo to use
      style:                            # Inline CSS to apply to logo.
  config:                           # One or more config sections to fill with data
    section_name:                       # Name of the config section
     - config_field                     # Config field name
  note: Extra markdown info...      # Optional text adding more info

OAuth authentication

The extension registry has support for integrating OAuth for service integration. This works by opening a pop-up targeted at the configured endpoint, during the flow we try polling with postMessage targeted at the callback origin. Once the flow is complete, and your callback page loads it should install an event listener that will reply to our polling. Once our code has the data we close the pop-up for you.

const data = {
  auth_token: ...,
  state: ...,
  error: ...,
  error_description: ...,
};
window.addEventListener('message', event => {
  if (event.origin === 'https://mopidy.com') {
    event.source.postMessage(data, event.origin);
  }
});

Note that the field names in the data should be mapped to the expected config field names. E.g. mapping access_token to auth_token. The error field is an error code, and error_description a human friendly version of the same error. state is there to pass back any initial state we might have sent to the endpoint.

website's People

Contributors

adamcik avatar antipiot avatar arthurlutz avatar avanc avatar cristianpb avatar dependabot[bot] avatar girst avatar jodal avatar kingosticks avatar lesterpig avatar mcarlton00 avatar natumbri avatar prior99 avatar sphh avatar unusualcomputers 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.