:date: 2012-09-06 12:08 .. index:: tech, blogg, octopress, ruby, wordpress, audio.js .. seealso:: * :ref:`2012-wordpress_to_octopress` * :ref:`2012-wordpress_to_octopress_comments` * :ref:`2012-wordpress_to_octopress_galleries` * :ref:`2012-wordpress_to_octopress_images` * :ref:`2012-wordpress_to_octopress_videos` .. _`2012-wordpress_to_octopress_audio`: Wordpress to Octopress: Audio ============================= .. image:: /_images/images/gallery/2012/2012-placeholder/20120828-wordpress_to_octopress.png :alt: Wordpress to Octopress :align: right :scale: 50 Another step on the migration from `Wordpress `__ to `Octopress `__ is to get the audio elements and embedded audio files to the new platform. Well, the files are quite simple, but to get some plugins playing nicely with them, is a different story. After testing around with some of the `many available plugins `__ (like `soundmanager2 `__) and failing all time long I stumbled over `audio.js `__. Again. I remembered that I once was working on this specific problem a couple of months ago and I've already included the plugin into the theme. A simple test confirmed it was working and so I've re-written the `photo_tag-plugin from Devin Weaver `__ again and created the plugin for replacing an audio-tag with the corresponding code. It's plain and simple. #. Add the :file:`audio.min.js` file to your JavaScript folder. #. Include the code from the :file:`audio.js` project into your Octopress installation by putting the JavaScript lines into your :file:`head.html` (watch out for the correct paths here!) .. code:: bash #. You'll find the code below. Save it to a file :file:`/plugins/audio_tag.rb` and it should work. One comment on that: I prefer to not automatically start the plugin to play when initialised. Therefore the parameter for the :program:`audio.js`-plugin has been set to "none". If you want it in an other way, replace the parameter: .. code:: bash preload="auto"