ownCloud Planet

Welcome to ownCloud News, our contributor blog roll. ownCloud contributors should ask to get added!

Opinions are the responsibility of those who express them. See our privacy policy.

If you'd like to stay up to date with ownCloud news you could also subscribe to our newsletter!

Evert Pot
Switching to Google AMP and back
October 25, 2016

A few months ago I added support for AMP to this blog. Not that it desperately needed it, but the premise seemed interesting and I figured it would be good to get some experience with new technology. The real selling point for me is how fast this website would appear in search results.

The switch to AMP

This website is built with Jekyll, hosted on Github pages, and behind a Cloudflare proxy. Why cloudflare? Same reason for using AMP! Websites are pretty much my business, and I want my own home to be powered by both TLS and HTTP/2!

What this meant for AMP though is that I had to change my main site into an AMP site. Dynamic websites unlike this might be able to create both an AMP and non-AMP website.

In practice these are the things I had to do:

  • Inline stylesheets. This was fairly easy with jekyll, I just had to change my linked stylesheets to an {% include .. %}.
  • Add a bunch of AMP boilerplate.
  • Add JSON-LD in my website header. The AMP website says it’s not required, but without it you’re not going to get AMP support in google results.
  • Changing all <img> tags to <amp-img> tags.
  • Removing all javascript. The only bits of JS I had was for google analytics, which gets replaced with <amp-analytics>.
  • And.. Disqus. This was a bit harder to solve.


Disqus requires javascript. I figured the best solution for using Disqus with AMP is to have the Disqus comment box run in an iframe. This created a few more challenges:

AMP doesn’t allow javascript, but it does allow iframes using <amp-iframe>, but there’s a caveat. If you want to run javascript inside that iframe, the iframe has to be hosted on a different domain for security reasons.

I tried to trick it with some domain variations, and a redirect, but had no luck. I ended up creating a separate github repository specifically for serving my Disqus comments.

This worked, but there was a second issue. Disqus itself also uses an iframe to embed comments. To ensure that this Disqus iframe is large enough, it will dynamically resize based on its contents.

I had to do something similar. I had to detect when the inner Disqus iframe resized, so I could resize the outer amp iframe. I had trouble doing this with my usual javascript events. After I while I realized that Disqus itself must send a message from the iframe to the top document. I figured it would likely do this with the postMessage javascript API. And I was right!

So all I had to do is listen for the resize messages the Disqus application sends out, and then forward the resize messages to the AMP document. A total hack, but here is a snippet:

window.addEventListener('message', function(ev) {
    if (String(ev.data).charAt(0)!=='{') {
        // Not a disqus event
    var data = JSON.parse(ev.data);
    if (data.name !== "resize") return;
    // We just got a resize event from disqus.
    // This means we need to tell AMP in the parent
    // to also resize the parent iframe.
        sentinel: 'amp',
        type: 'embed-size',
        height: document.body.scrollHeight
    }, '*');
}, false);

You can find the full iframe source here.

A few months later Disqus themselves officially announced support for AMP as well, rendering my solution pointless, but as it turns out their solution is pretty much the same as my own hack!

But! I wasn’t out of the woods. As it turns out, AMP iframes are only allowed to be placed ‘below the fold’. Their definition of this is at least 600px from the top or not within the first 75% of the page.

I have a few articles on my blog that are just 1 paragraph, so as a result for those Disqus boxes simply would not load. Bummer!

Switching back to HTML

Today I’m switching back from AMP to regular HTML. One reason is that I found that Disqus didn’t always reliably resizes, but there’s a few others.

I’ve always been pretty big on web standards, and AMP is basically a deviation from that. I really didn’t enjoy changing my <img> to <amp-img> tags. The weird boilerplate and new dependency on javascript didn’t help either. I believe my blog should be useful and useable in in places where Javascript is not enabled, and after removing AMP, this is true once more.

I believe that web standards will always win, so bending to the will of Google Engineers that make the web less open for something that is likely a fad didn’t seem right to me.

Another issue is that google effectively takes over your traffic, and replaces your url with their own. This means that if people want to share a link to your site, they’ll link to google, not you.

I still like the idea of AMP, and I would be happy to restrict myself to a stricter subset of HTML and CSS for better performance and to be allowed to be preloaded in google search results on mobile, but I refuse to tie myself to a superset. For AMP for me to be an option, the following has to be true:

  1. Don’t require javascript for normal website operations.
  2. Don’t rely on proprietary extensions, and let me use standard HTML for basic features like <img>.
  3. Provide an easy way for users to discover the real URL.

The real question I would have though, is why didn’t they just use Atom or RSS for this? (Atom the xml format, not the bulky text editor).

Some benefits of Atom:

  1. Allows embedding of full articles in HTML.
  2. It’s widely accepted that Atom is going to be consumed in places that don’t allow javascript, and tend to have minimal markup, describing content, not presentation.
  3. Is extremely widely, almost universally supported by news agencies and blogs, which seems to be the target audience for AMP.
  4. Contains meta-data related to publishing, so it doesn’t require embedding JSON-LD blobs.

Anyway, welcome back to the HTML website!

Some more reading:

read more

Evert Pot
Syntax highlighting in presentations
October 19, 2016

I often go back and forward between presentations software, trying to find the best one, never being happy. I recently used cleaver, which is nice for simple stuff, but this time I’m back to LibreOffice Impress because I don’t want to spend a long time fighting with layout.

One task that’s never super obvious is figuring out how to do syntax highlighting of code in my presentations. I wanted to share my solution. I’m fairly sure this will also work for MS Office and maybe even Keynote.

First, download Pygments. Pygments is a syntax highlighting tool for the command line.

On ubuntu it can be installed with:

apt-get install python-pygments

If you’re on a Mac, I don’t believe there’s a homebrew package. This should work though:

sudo easy_install Pygments

After that, we’re using the tool to convert your source file into a syntax highlighted RTF file! Yes, the old school format you’d never thought you’d need again.

Run it like this:

pygmentize -O style=xcode -o output.rtf input.js

I picked the xcode style, because it worked fairly well with the light backgrounds in my presentation, but other styles are supported. To see a list run:

pygmentize -L

Instead of pygmentize I also tried highlight, but it was impossible for me to build and seems a bit over engineered.

Using the file

In LibreOffice Impress, just click “Insert” and then “File” to find your rtf file.

Batch syntax highlighting

I don’t want to have to type this every time, so I made this Makefile to automatically do this. The file assumes that you have:

  • A src/ directory containing .js files (you can change the extension).
  • An empty rtf/ directory.

SRC = $(wildcard src/*.js)

RTF = $(patsubst src/%.js, rtf/%.js.rtf, $(SRC))

all: $(RTF)

rtf/%.js.rtf: src/%.js
	pygmentize -O style=$(STYLE) -o $@ $<

	rm rtf/*.rtf

read more

Steffen Lindner
Nextcloud/ownCloud Mail v0.6 released – with alias support
October 13, 2016

hacking_insideWe worked hard during the Nextcloud Conference to get version 0.6 of the Mail app ready! 😎

It is now possible to add aliases to your email accounts! This feature was implemented by our GSOC student Tahaa Karim. He also worked on Signature support which is far but not yet merged. If someone wants this feature any help is appreciated.

The most recent version of the Mail app only works on ownCloud 9.1 and Nextcloud 10. Older installations need to use version 0.5.3. As most of the Mail developers have moved to Nextcloud, extensive testing only happens there. We also moved our git repository to the Nextcloud organisation, and the app version 0.6.0 was built from the code there.

It has already been uploaded to the ownCloud app store and can also be downloaded from Github.

Here is the 0.6 changelog:


  • Alias support #1523 @tahaalibra
  • New incoming messages are prefetched #1631 @ChristophWurst
  • Custom app folder support #1627 @juliushaertl
  • Improved search #1609 @ChristophWurst
  • Scroll to refresh #1595 @ChristophWurst
  • Shortcuts to star and mark messages as unread #1590 @ChristophWurst
  • Shortcuts to select previous/next messsage #1557 @ChristophWurst


  • Minimum server is Nextcloud 10/ownCloud 9.1 #84 @ChristophWurst
  • Use session storage instead of local storage for client-side cache #1612 @ChristophWurst
  • When deleting the current message, the next one is selected immediatelly #1585 @ChristophWurst


  • Client error while composing a new message #1609 @ChristophWurst
  • Delay app start until page has finished loading #1634 @ChristophWurst
  • Auto-redirection of HTML mail links #1603 @ChristophWurst
  • Update folder counters when reading/deleting messages #1585

Special thanks goes out to your testing member plastikschnitzer!✌️ If you wanna help test new Mail releases, just drop us a message or leave a comment.

read more

Adam Pigg
Announcing Kexi 3.0.0
October 6, 2016

I will steal heavily from the email announcement, as it says it all, with a bit extra at the end....


Dear All,

We're pleased to announce the release of Kexi 3.0.0.

For benefit and convenience of fellow software engineers, we're sharing frameworks originally developed within the Kexi Project (that is KDb, KProperty, KReport). There are marked with the same version 3.0.0 and are prepared for general, standalone usage. So this combined release marks a major milestone for two efforts: porting to Qt 5 started in 2014, development of the three frameworks started in 2008.

Downloads & change logs:

Reporting bug or wishes:

As a note, we would be more than happy for other developers to find innovative uses for our framework libraries, KDb (database abstraction), KProperty (properties and editor) and KReport (visual report building for applications). If you think you can use these libraries, we would love to hear from you with feature suggestions and feedback, join us in #kexi!

read more

Klaas Freitag
Recent ownCloud Releases
October 4, 2016

Even though we just had the nice and successful ownCloud Contributor Conference there have quite some ownCloud releases happened recently. I like to draw your attention to this for a moment, because some people seem to fail to see how active the ownCloud community actually is at the moment.

There has been the big enterprise release 9.1 on September 20th, but that of course came along with community releases which are in the focus here.

We had server release 8.0.15, server release 8.1.10, server release 8.2.8 and release 9.0.5. There are maintenance releases for the older major versions, needed to fix bugs on installations that still run on these older versions. We deliver them following this plan.

The latest and greatest server release is release 9.1.1 that has all the hardening that also went into the enterprise releases.

Aside a ton of bugfixes that you find listed in the changelog there have also been interesting changes which drive innovation. To pick just one example: The data fingerprint property. It enables the clients to detect if the server got a backup restored, and saves changes on the clients to conflict files if needed. This is a nice example of solutions which are based on feedback from enterprise customers community running ownCloud, who help with reporting problems and proposing solutions.

Talking about professional usage of ownCloud: Of course also all the server release are available as linux packages for various distributions, for example the ownCloud server 9.1.1 packages. We think that our users should not be forced to deploy from tarballs, which is error prone and not native to Linux, but have the choice to use linux packages through the distributions package management.

There also have been client releases recently: The Android client versions 2.1.1 and 2.1.2 were released with important changes for Android 7 and much more fixes, as well as iOS client versions 3.5.0 and 3.5.1. The desktop client 2.2.4 also got a regular bug fix update (Changelog).

I guess you agree that is a lot of activity shown in the ownCloud project, making sure to get the best ownCloud experience out there for the users, driven by passion for the project and professional usage in focus.

If you are interested and want to join in and make ownCloud better, jump in on ownCloud Central or Github. It’s fun!

read more