Code Monkey home page Code Monkey logo

yandex_fotki's Introduction

Yandex-Fotki

Pelican plugin to use fotki.yandex.ru as fast photo gallery CDN for free.

It is proof of concept but works well for me.

The plugin gets images through JSON API and put lists to article object. Sample templates are in /tmplates/includes/ folder.

fotki.yandex.ru api description here.

HOWTO use

  1. Add to plugins: PLUGINS = […, 'yandex_fotki', …]

  2. Add YANDEX_FOTKI_USER settings to the pelicanconf.py

    YANDEX_FOTKI_USER = 'sky7club'
    
  3. Change templates to use article.galleryimages list and cover image article.cover dict.

  4. Add metadata to article:

    yandex_gallery: 532270
    

    where 532270 is gallery id.

Example

Works here sky7club.ru

Sample HTML:

<p class="galleria">
        <span itemscope itemtype="http://schema.org/ImageObject">
        <a class="531011 cboxElement"
               href="https://img-fotki.yandex.ru/get/52656/429009185.11/0_1ebfb6_b848e55_XXXL"
               title="Параплан ASA Тайран 5, Чегем" itemprop="contentUrl"
               ><img src="https://img-fotki.yandex.ru/get/52656/429009185.11/0_1ebfb6_b848e55_L" alt="Параплан ASA Тайран 5, Чегем"></a>
        <meta itemprop="caption" content="Параплан ASA Тайран 5, Чегем">
        </span>
        <span itemscope itemtype="http://schema.org/ImageObject">
        <a class="531011 cboxElement"
               href="https://img-fotki.yandex.ru/get/197923/429009185.11/0_1ebfb4_31e386af_XXXL"
               title="Парадром Чегем, вид на Прирамиду" itemprop="contentUrl"
               ><img src="https://img-fotki.yandex.ru/get/197923/429009185.11/0_1ebfb4_31e386af_L" alt="Парадром Чегем, вид на Прирамиду"></a>
        <meta itemprop="caption" content="Парадром Чегем, вид на Прирамиду">
        </span>
</p>

yandex_fotki's People

Contributors

iv avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.