lektor / lektor-atom

Lektor Atom plugin.
30 stars 13 forks source link

not documented that you cannot use relative URLs #21

Open rgommers opened 5 years ago

rgommers commented 5 years ago
U feed.xml
  E feed.xml (RuntimeError: To use absolute URLs you need to configure the URL i

This happens if you do not set url in the main .lektorproject file. Explanation from https://github.com/lektor/lektor-website/blob/dbb88eadb619bb3227a15568029d14cd727dea95/content/docs/content/urls/contents.lr#external-and-absolute-urls:

Lektor by default will prefer relative URLs. This makes it possible to easily host a website below a certain folder without having to do anything special to make this work. However there are some features which will require the use of an absolute or fully canonical (external) URL. For instance sitemaps or Atom feeds do not work with relative URLs. In this case the absolute URL path has to be configured.

You can pick the default for URL generation in the project configuration. For more information read about the Project Configuration :ref.

The default of relative, a relative URL style, means that you can deploy a website to a sub folder without any configuration, however most likely custom 404 pages will fail to find the needed assets. Fully canonical URLs are not recommended as default style.

So you have to set something that is not recommended to use lektor-atom it seems.

goanpeca commented 5 years ago

I believe there should be a way of forcing this config within this plugin so it is independent of the global configuration of the project.

Will take a look

TimidRobot commented 5 years ago

duplicate of #4