Link to rss feed in head for certain pages

19 views
Skip to first unread message

Lars Bjørndal

unread,
Feb 12, 2023, 5:26:42 AM2/12/23
to nikola-...@googlegroups.com
Hi list!

Some pages on a site does present a podcast. How can I add a Link to the
rss feed for the podcast in the head section? Can I somehow do it in the
.rst file?

Thanks in advance
Lars

Roberto Alsina

unread,
Feb 12, 2023, 8:00:20 AM2/12/23
to Nikola—Discuss
Only ways that come to mind is to use a different template for each page that adds the required link, or use JavaScript to inject it, but that's not going to be very useful.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/m3357bw55t.fsf%40dalen.lamasti.net.

Lars Bjørndal

unread,
Feb 12, 2023, 11:16:22 AM2/12/23
to nikola-...@googlegroups.com
Thank you. Sounds good. But how do I use a specific template only for certain pages on a site?

Thanks

Lars

On Sun, Feb 12, 2023 at 10:00:06AM -0300, Roberto Alsina wrote:
> Only ways that come to mind is to use a different template for each page that
> adds the required link, or use JavaScript to inject it, but that's not going to
> be very useful.
>
> On Sun, Feb 12, 2023, 7:26 AM Lars Bjørndal <[1]la...@lamasti.net> wrote:
>
> Hi list!
>
> Some pages on a site does present a podcast. How can I add a Link to the
> rss feed for the podcast in the head section? Can I somehow do it in the
> .rst file?
>
> Thanks in advance
> Lars
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [2]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [3]https://groups.google.com/d/
> msgid/nikola-discuss/m3357bw55t.fsf%40dalen.lamasti.net.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [4]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [5]https://groups.google.com/d/msgid/
> nikola-discuss/
> CALXDAfp8rKZ0sN%3DJQZb5razeU7eZpDr9zdz_01UBZWLtS0UVQg%40mail.gmail.com.
>
> References:
>
> [1] mailto:la...@lamasti.net
> [2] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [3] https://groups.google.com/d/msgid/nikola-discuss/m3357bw...@dalen.lamasti.net
> [4] mailto:nikola-discus...@googlegroups.com
> [5] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN=JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=email&utm_source=footer

Roberto Alsina

unread,
Feb 12, 2023, 11:49:49 AM2/12/23
to Nikola—Discuss
Use the "template" metadata. There are details in the docs and examples in the demo site.

To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/Y%2BkQ0BOcAvKfOktg%40lamasti.net.

Lars Bjørndal

unread,
Mar 8, 2023, 10:35:18 AM3/8/23
to nikola-...@googlegroups.com
On Sun, Feb 12, 2023 at 01:49:34PM -0300, Roberto Alsina wrote:
> Use the "template" metadata. There are details in the docs and examples in the
> demo site.

Thank you. I'm using the bottstrap4 theme. Is it then the base_helper.tmpl file I need to modify?

Thanks

Lars

> On Sun, Feb 12, 2023, 1:16 PM Lars Bjørndal <[1]la...@lamasti.net> wrote:
>
> Thank you. Sounds good. But how do I use a specific template only for
> certain pages on a site?
>
> Thanks
>
> Lars
>
> On Sun, Feb 12, 2023 at 10:00:06AM -0300, Roberto Alsina wrote:
> > Only ways that come to mind is to use a different template for each page
> that
> > adds the required link, or use JavaScript to inject it, but that's not
> going to
> > be very useful.
> >
> > On Sun, Feb 12, 2023, 7:26 AM Lars Bjørndal <[1][2]la...@lamasti.net>
> wrote:
> >
> >     Hi list!
> >
> >     Some pages on a site does present a podcast. How can I add a Link to
> the
> >     rss feed for the podcast in the head section? Can I somehow do it in
> the
> >     .rst file?
> >
> >     Thanks in advance
> >     Lars
> >
> >     --
> >     You received this message because you are subscribed to the Google
> Groups
> >     "nikola-discuss" group.
> >     To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email to [2][3]nikola-discus...@googlegroups.com.
> >     To view this discussion on the web visit [3][4]https://
> groups.google.com/d/
> >     msgid/nikola-discuss/m3357bw55t.fsf%[5]40dalen.lamasti.net.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nikola-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to [4][6]nikola-discus...@googlegroups.com.
> > To view this discussion on the web visit [5][7]https://groups.google.com/
> d/msgid/
> > nikola-discuss/
> > CALXDAfp8rKZ0sN%3DJQZb5razeU7eZpDr9zdz_01UBZWLtS0UVQg%[8]40mail.gmail.com
> .
> >
> > References:
> >
> > [1] mailto:[9]la...@lamasti.net
> > [2] mailto:[10]nikola-discuss%2Bunsu...@googlegroups.com
> > [3] [11]https://groups.google.com/d/msgid/nikola-discuss/
> m3357bw...@dalen.lamasti.net
> > [4] mailto:[12]nikola-discus...@googlegroups.com
> > [5] [13]https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN=
> JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=email&
> utm_source=footer
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [14]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [15]https://groups.google.com/d/
> msgid/nikola-discuss/Y%2BkQ0BOcAvKfOktg%40lamasti.net.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [16]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [17]https://groups.google.com/d/msgid/
> nikola-discuss/
> CALXDAfq2Z2NbVQkzT7gwmsdWDJA926H4mqc43xk4XKkXAym7gw%40mail.gmail.com.
>
> References:
>
> [1] mailto:la...@lamasti.net
> [2] mailto:la...@lamasti.net
> [3] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [4] https://groups.google.com/d/
> [5] http://40dalen.lamasti.net/
> [6] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [7] https://groups.google.com/d/msgid/
> [8] http://40mail.gmail.com/
> [9] mailto:la...@lamasti.net
> [10] mailto:nikola-discuss%252Buns...@googlegroups.com
> [11] https://groups.google.com/d/msgid/nikola-discuss/m3357bw...@dalen.lamasti.net
> [12] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [13] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN=JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=email&utm_source=footer
> [14] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [15] https://groups.google.com/d/msgid/nikola-discuss/Y%2BkQ0BOc...@lamasti.net
> [16] mailto:nikola-discus...@googlegroups.com
> [17] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfq2Z2NbVQkzT7gwmsdW...@mail.gmail.com?utm_medium=email&utm_source=footer

Roberto Alsina

unread,
Mar 8, 2023, 10:51:15 AM3/8/23
to nikola-...@googlegroups.com
On Wed, Mar 8, 2023 at 12:35 PM Lars Bjørndal <la...@lamasti.net> wrote:
On Sun, Feb 12, 2023 at 01:49:34PM -0300, Roberto Alsina wrote:
> Use the "template" metadata. There are details in the docs and examples in the
> demo site.

Thank you. I'm using the bottstrap4 theme. Is it then the base_helper.tmpl file I need to modify?


I was thinking more along these lines:

1) For the special pages, set the "template" metadata to something like "podcast.tmpl"
2) Create templates/podcast.tmpl


Let's say you want this to look like a normal page, just with that extra link in the HEAD part. That means you want it to behave a lot like page.tmpl

So, the template could be something like this (not tested, probably not 100% right):

<%inherit file="page.tmpl"/>
<%block name="extra_head">
    ${parent.extra_head()}

AND HERE ADD THE STUFF YOU WANT

</%block>


 
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/ZAirMMODKgONTnAW%40lamasti.net.

Lars Bjørndal

unread,
Mar 9, 2023, 2:32:54 AM3/9/23
to nikola-...@googlegroups.com
Yes - works perfectly!

Thanks,
Lars

On Wed, Mar 08, 2023 at 12:50:49PM -0300, Roberto Alsina wrote:
> On Wed, Mar 8, 2023 at 12:35 PM Lars Bjørndal <[1]la...@lamasti.net> wrote:
>
> On Sun, Feb 12, 2023 at 01:49:34PM -0300, Roberto Alsina wrote:
> > Use the "template" metadata. There are details in the docs and examples
> in the
> > demo site.
>
> Thank you. I'm using the bottstrap4 theme. Is it then the base_helper.tmpl
> file I need to modify?
>
>
>
> I was thinking more along these lines:
>
> 1) For the special pages, set the "template" metadata to something like
> "podcast.tmpl"
> 2) Create templates/podcast.tmpl
>
>
> Let's say you want this to look like a normal page, just with that extra link
> in the HEAD part. That means you want it to behave a lot like page.tmpl
>
> So, the template could be something like this (not tested, probably not 100%
> right):
>
> <%inherit file="page.tmpl"/>
> <%block name="extra_head">
>     ${parent.extra_head()}
>
> AND HERE ADD THE STUFF YOU WANT
>
> </%block>
>
>
>  
>
> Thanks
>
> Lars
>
> > On Sun, Feb 12, 2023, 1:16 PM Lars Bjørndal <[1][2]la...@lamasti.net>
> wrote:
> >
> >     Thank you. Sounds good. But how do I use a specific template only for
> >     certain pages on a site?
> >
> >     Thanks
> >
> >     Lars
> >
> >     On Sun, Feb 12, 2023 at 10:00:06AM -0300, Roberto Alsina wrote:
> >     > Only ways that come to mind is to use a different template for each
> page
> >     that
> >     > adds the required link, or use JavaScript to inject it, but that's
> not
> >     going to
> >     > be very useful.
> >     >
> >     > On Sun, Feb 12, 2023, 7:26 AM Lars Bjørndal <[1][2][3]
> la...@lamasti.net>
> >     wrote:
> >     >
> >     >     Hi list!
> >     >
> >     >     Some pages on a site does present a podcast. How can I add a
> Link to
> >     the
> >     >     rss feed for the podcast in the head section? Can I somehow do
> it in
> >     the
> >     >     .rst file?
> >     >
> >     >     Thanks in advance
> >     >     Lars
> >     >
> >     >     --
> >     >     You received this message because you are subscribed to the
> Google
> >     Groups
> >     >     "nikola-discuss" group.
> >     >     To unsubscribe from this group and stop receiving emails from
> it,
> >     send an
> >     >     email to [2][3][4]nikola-discus...@googlegroups.com.
> >     >     To view this discussion on the web visit [3][4]https://
> >     [5]groups.google.com/d/
> >     >     msgid/nikola-discuss/m3357bw55t.fsf%[5][6]40dalen.lamasti.net.
> >     >
> >     > --
> >     > You received this message because you are subscribed to the Google
> Groups
> >     > "nikola-discuss" group.
> >     > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> >     > to [4][6][7]nikola-discus...@googlegroups.com.
> >     > To view this discussion on the web visit [5][7][8]https://
> groups.google.com/
> >     d/msgid/
> >     > nikola-discuss/
> >     > CALXDAfp8rKZ0sN%3DJQZb5razeU7eZpDr9zdz_01UBZWLtS0UVQg%[8][9]
> 40mail.gmail.com
> >     .
> >     >
> >     > References:
> >     >
> >     > [1] mailto:[9][10]la...@lamasti.net
> >     > [2] mailto:[10][11]nikola-discuss%2Bunsu...@googlegroups.com
> >     > [3] [11][12]https://groups.google.com/d/msgid/nikola-discuss/
> >     [13]m3357bw...@dalen.lamasti.net
> >     > [4] mailto:[12][14]nikola-discus...@googlegroups.com
> >     > [5] [13][15]https://groups.google.com/d/msgid/nikola-discuss/
> CALXDAfp8rKZ0sN=
> >     [16]JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=
> email&
> >     utm_source=footer
> >
> >     --
> >     You received this message because you are subscribed to the Google
> Groups
> >     "nikola-discuss" group.
> >     To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email to [14][17]nikola-discus...@googlegroups.com.
> >     To view this discussion on the web visit [15][18]https://
> groups.google.com/d/
> >     msgid/nikola-discuss/Y%2BkQ0BOcAvKfOktg%[19]40lamasti.net.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nikola-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to [16][20]nikola-discus...@googlegroups.com.
> > To view this discussion on the web visit [17][21]https://
> groups.google.com/d/msgid/
> > nikola-discuss/
> > CALXDAfq2Z2NbVQkzT7gwmsdWDJA926H4mqc43xk4XKkXAym7gw%[22]40mail.gmail.com.
> >
> > References:
> >
> > [1] mailto:[23]la...@lamasti.net
> > [2] mailto:[24]la...@lamasti.net
> > [3] mailto:[25]nikola-discuss%2Bunsu...@googlegroups.com
> > [4] [26]https://groups.google.com/d/
> > [5] [27]http://40dalen.lamasti.net/
> > [6] mailto:[28]nikola-discuss%2Bunsu...@googlegroups.com
> > [7] [29]https://groups.google.com/d/msgid/
> > [8] [30]http://40mail.gmail.com/
> > [9] mailto:[31]la...@lamasti.net
> > [10] mailto:[32]nikola-discuss%252Buns...@googlegroups.com
> > [11] [33]https://groups.google.com/d/msgid/nikola-discuss/
> m3357bw...@dalen.lamasti.net
> > [12] mailto:[34]nikola-discuss%2Bunsu...@googlegroups.com
> > [13] [35]https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN
> =JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=email&
> utm_source=footer
> > [14] mailto:[36]nikola-discuss%2Bunsu...@googlegroups.com
> > [15] [37]https://groups.google.com/d/msgid/nikola-discuss/
> Y%2BkQ0BOc...@lamasti.net
> > [16] mailto:[38]nikola-discus...@googlegroups.com
> > [17] [39]https://groups.google.com/d/msgid/nikola-discuss/
> CALXDAfq2Z2NbVQkzT7gwmsdW...@mail.gmail.com?
> utm_medium=email&utm_source=footer
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [40]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [41]https://groups.google.com/d/
> msgid/nikola-discuss/ZAirMMODKgONTnAW%40lamasti.net.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [42]nikola-discus...@googlegroups.com.
> To view this discussion on the web visit [43]https://groups.google.com/d/msgid/
> nikola-discuss/
> CALXDAfrqbKB0c-g7P4zecj3n3g77h6Knt57J%2BjSYqf-g4SjUow%40mail.gmail.com.
>
> References:
>
> [1] mailto:la...@lamasti.net
> [2] mailto:la...@lamasti.net
> [3] mailto:la...@lamasti.net
> [4] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [5] http://groups.google.com/d/
> [6] http://40dalen.lamasti.net/
> [7] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [8] https://groups.google.com/
> [9] http://40mail.gmail.com/
> [10] mailto:la...@lamasti.net
> [11] mailto:nikola-discuss%252Buns...@googlegroups.com
> [12] https://groups.google.com/d/msgid/nikola-discuss/
> [13] mailto:m3357bw...@dalen.lamasti.net
> [14] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [15] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN=
> [16] http://JQZb5razeU7eZpDr9...@mail.gmail.com/?utm_medium=email&
> [17] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [18] https://groups.google.com/d/
> [19] http://40lamasti.net/
> [20] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [21] https://groups.google.com/d/msgid/
> [22] http://40mail.gmail.com/
> [23] mailto:la...@lamasti.net
> [24] mailto:la...@lamasti.net
> [25] mailto:nikola-discuss%252Buns...@googlegroups.com
> [26] https://groups.google.com/d/
> [27] http://40dalen.lamasti.net/
> [28] mailto:nikola-discuss%252Buns...@googlegroups.com
> [29] https://groups.google.com/d/msgid/
> [30] http://40mail.gmail.com/
> [31] mailto:la...@lamasti.net
> [32] mailto:nikola-discuss%25252Bun...@googlegroups.com
> [33] https://groups.google.com/d/msgid/nikola-discuss/m3357bw...@dalen.lamasti.net
> [34] mailto:nikola-discuss%252Buns...@googlegroups.com
> [35] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfp8rKZ0sN=JQZb5razeU7eZpDr9...@mail.gmail.com?utm_medium=email&utm_source=footer
> [36] mailto:nikola-discuss%252Buns...@googlegroups.com
> [37] https://groups.google.com/d/msgid/nikola-discuss/Y%2BkQ0BOc...@lamasti.net
> [38] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [39] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfq2Z2NbVQkzT7gwmsdW...@mail.gmail.com?utm_medium=email&utm_source=footer
> [40] mailto:nikola-discuss%2Bunsu...@googlegroups.com
> [41] https://groups.google.com/d/msgid/nikola-discuss/ZAirMMOD...@lamasti.net
> [42] mailto:nikola-discus...@googlegroups.com
> [43] https://groups.google.com/d/msgid/nikola-discuss/CALXDAfrqbKB0c-g7P4zecj3n3g77h6Knt57J%2BjSYqf...@mail.gmail.com?utm_medium=email&utm_source=footer
Reply all
Reply to author
Forward
0 new messages