You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Sylvain Wallez <sy...@apache.org> on 2015/01/03 17:40:53 UTC

Re: Getting started with Sling

Hi Henry. Sorry for the late answer and happy new year :-)

Le 31/12/2014 01:26, Henry Saginor a écrit :
> You could add Makdown4j as embedded dependency inside your pom, something felix maven plugin supports [1]. It does not have to be an OSGi bundle. It will just get embedded in your OSGi bundles’ jar and added to it’s internal classpath.

Thanks ! Adding <Embed-Dependency> to the pom did the trick!

> You could also try to add it to the /apps/<appDir>/install in Sling. I believe jcrinstaller has some magic to wrap it as OSGi bundle even if it does not have OSGi manifest headers.
> I think neither one of these are great solutions. It would be better to actually add Markdown as another supported scripting/templating option to Sling in its own bundle. But for your purpose these would work.

Indeed, there seems to be a number of "magic" places in Sling. I've seen 
some of them mentioned in the docs ( (/apps, /var, /etc...) but haven't 
found a comprehensive list. Or did I miss it?

> By the way I am experimenting with Sightly+Sling and will probably work on an example. I am thinking implementing a blog would be an interesting exercise. If you are interested I could put something in github. But most likely it will not be this holiday weekend. :)
> Sightly is a new templating engine that was just contributed by Adobe to Sling.

Any template language is certainly better than JSP :-)

I've read about Slightly, and it looks nice and modern. I'm also a big 
fan of attribute-driven and element-driven templates that don't mix 
foreign control structures (e.g. <%= and %>) in markup. One of the many 
reasons I love AngularJS!

+1 for helping building a blog engine if I can, or at least learn from 
it. And Github is fine, but you should consider contributing it as a 
tutorial for Sling newbies like me!

Sylvain

-- 
Sylvain Wallez - http://bluxte.net


Re: Getting started with Sling

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Jan 5, 2015 at 5:01 PM, Bruce Edge
<br...@nextissuemedia.com> wrote:
> ...I¹ve seen references to /etc and /system, which appears to be different
> from /jcr:system, do these have any significance?...

/etc/map is used for the URL to resource mappings as per
http://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html
you're right - forgot about that one.

/system is the default base path for the webconsole and junit servlet,
so yes that's also reserved, with the default settings.

-Bertrand

Re: Getting started with Sling

Posted by Bruce Edge <br...@nextissuemedia.com>.
From: Bertrand Delacretaz <bd...@apache.org>
>I think the only really "magic" locations are defined by the resource
>resolver's search paths, which by default is set to [ /libs , /apps ].
>
>That's used to locate request processing scripts (looking under /apps
>first), and the JCR provider of the OSGi installer also uses that
>search path to find installable resources, in "install" (another magic
>name) folders under those paths.

I¹ve seen references to /etc and /system, which appears to be different
from /jcr:system, do these have any significance?

-Bruce


>
>All those locations are configurable of course, but in general it's
>easier to just stick to the default values.
>
>-Bertrand


Re: Getting started with Sling

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Sat, Jan 3, 2015 at 5:40 PM, Sylvain Wallez <sy...@apache.org> wrote:
> ...Indeed, there seems to be a number of "magic" places in Sling. I've seen
> some of them mentioned in the docs ( (/apps, /var, /etc...) but haven't
> found a comprehensive list....

I think the only really "magic" locations are defined by the resource
resolver's search paths, which by default is set to [ /libs , /apps ].

That's used to locate request processing scripts (looking under /apps
first), and the JCR provider of the OSGi installer also uses that
search path to find installable resources, in "install" (another magic
name) folders under those paths.

All those locations are configurable of course, but in general it's
easier to just stick to the default values.

-Bertrand