Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support shortcode output format for RSS feeds #5204

Closed
max-arnold opened this issue Sep 12, 2018 · 8 comments
Closed

Feature request: support shortcode output format for RSS feeds #5204

max-arnold opened this issue Sep 12, 2018 · 8 comments

Comments

@max-arnold
Copy link
Contributor

Background

There are multiple cases where people try to render the .Content slightly differently for RSS feeds:

This is possible to do after #3220 was implemented, by setting page = ["HTML", "RSS"] and adding SHORTCODE.rss.xml template variant. Unfortunately, this setting produces per-page RSS feeds which is suboptimal and can mislead some RSS readers (wrong RSS link).

Also there is slightly adjacent request to allow page context in shortcodes: https://discourse.gohugo.io/t/page-context-in-shortcodes/284

Feature proposal

  1. Allow shortcode output format to be selected based on home/section output format.
  2. Maybe also use page Kind in the shortcode template lookup order. This would allow to solve the adjacent use case https://discourse.gohugo.io/t/page-context-in-shortcodes/284

Plus it makes sense to document format- and language-dependent shortcode lookup order here https://gohugo.io/templates/shortcode-templates/#shortcode-template-lookup-order

@kizu
Copy link

kizu commented Nov 12, 2018

Yes, this is something I'd really like to see as well! Basically, it would be nice to have not only for RSS, but just for any output format.

And, maybe, I'd call the current behaviour a bug? I'd say that if there is an output for at least one type of pages (home for RSS, for example), the shortcode substitute should still work, without the need to enable the RSS output format for page type.

@bep
Copy link
Member

bep commented Nov 12, 2018

And, maybe, I'd call the current behaviour a bug?

You can if you want, but int this particle case I suspect you will get faster attention on this if you label it an enhancement. "Fixing stuff" is not as motivational as "building stuff".

@bep bep added this to the v0.53 milestone Nov 12, 2018
@kizu
Copy link

kizu commented Nov 12, 2018

Oh, sorry, I didn't think about that it could be read like that, oops, didn't intend it like this. It was just that I tried using this without adding RSS to page a week ago and couldn't make it work even while I had it for home, so finding that adding it for page impacts the rendering of the home was strange.

This would totally be an enhancement, and I know a bunch of other people who would be happy to use this kind of feature — as I said, not only for RSS, but, for example, for .json, which can be used in the same way basically (for example, for search index json).

I would try to think more about how the wording of comments can motivate or demotivate maintainers and developers, sorry about that again!

@bep
Copy link
Member

bep commented Nov 12, 2018

I would try to think more about how the wording of comments can motivate or demotivate maintainers and developers, sorry about that again!

No problem, but I find that it is often more effective in the world of Open Source (where people spend their free time on stuff) to have a "glass half full" mindset. I don't mind adding the "bug label" on obvious misbehavior, but when in doubt, use the enhancement. This particular issue was implemented as intended and it works fine, but it has it's obvious limitations -- hence the "enhancement".

@bep bep modified the milestones: v0.53, v0.54 Dec 6, 2018
@bep bep modified the milestones: v0.54, v0.55 Dec 26, 2018
@bep bep modified the milestones: v0.55, v0.54 Jan 26, 2019
@bep
Copy link
Member

bep commented Jan 26, 2019

This will be fixed as part of #5583 -- sorry that this has taken so long, but I really had to look at this in a bigger picture.

bep added a commit to bep/hugo that referenced this issue Jan 28, 2019
bep added a commit to bep/hugo that referenced this issue Jan 30, 2019
bep added a commit to bep/hugo that referenced this issue Jan 30, 2019
bep added a commit to bep/hugo that referenced this issue Jan 31, 2019
bep added a commit to bep/hugo that referenced this issue Jan 31, 2019
@bep bep modified the milestones: v0.54, v0.55 Feb 1, 2019
bep added a commit to bep/hugo that referenced this issue Feb 2, 2019
bep added a commit to bep/hugo that referenced this issue Feb 6, 2019
bep added a commit to bep/hugo that referenced this issue Feb 6, 2019
bep added a commit to bep/hugo that referenced this issue Feb 6, 2019
bep added a commit to bep/hugo that referenced this issue Feb 6, 2019
bep added a commit to bep/hugo that referenced this issue Feb 7, 2019
bep added a commit to bep/hugo that referenced this issue Feb 8, 2019
bep added a commit to bep/hugo that referenced this issue Feb 11, 2019
bep added a commit to bep/hugo that referenced this issue Feb 18, 2019
bep added a commit to bep/hugo that referenced this issue Feb 19, 2019
bep added a commit to bep/hugo that referenced this issue Mar 17, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the old very file-oriented `hugolib.Page` struct to prepare for gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limiations, especially related to custom output formats, and shortcodes. And it's faster.

See gohugoio#5074
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5704
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 17, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the old very file-oriented `hugolib.Page` struct to prepare for gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limiations, especially related to custom output formats, and shortcodes. And it's faster.

See gohugoio#5074
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5704
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 17, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the old very file-oriented `hugolib.Page` struct to prepare for gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limiations, especially related to custom output formats, and shortcodes. And it's faster.

See gohugoio#5074
Fixes gohugoio#5759
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5704
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 17, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the old very file-oriented `hugolib.Page` struct to prepare for gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limiations, especially related to custom output formats, and shortcodes. And it's faster.

See gohugoio#5074
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5704
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 18, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the old very file-oriented `hugolib.Page` struct to prepare for gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limiations, especially related to custom output formats, and shortcodes. And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5704
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 19, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content rendered, e.g. Blackfriday.
This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 19, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content rendered, e.g. Blackfriday.
This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 19, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 19, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
bep added a commit to bep/hugo that referenced this issue Mar 19, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
bep added a commit to bep/hugo that referenced this issue Mar 20, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
bep added a commit to bep/hugo that referenced this issue Mar 20, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
bep added a commit to bep/hugo that referenced this issue Mar 21, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
bep added a commit to bep/hugo that referenced this issue Mar 21, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
bep added a commit to bep/hugo that referenced this issue Mar 22, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

And it's faster.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
bep added a commit to bep/hugo that referenced this issue Mar 23, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
@bep bep closed this as completed in 597e418 Mar 23, 2019
nguyenvanduocit pushed a commit to 12bitvn/hugo that referenced this issue Apr 5, 2019
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  gohugoio#5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See gohugoio#5074
Fixes gohugoio#5763
Fixes gohugoio#5758
Fixes gohugoio#5090
Fixes gohugoio#5204
Fixes gohugoio#4695
Fixes gohugoio#5607
Fixes gohugoio#5707
Fixes gohugoio#5719
Fixes gohugoio#3113
Fixes gohugoio#5706
Fixes gohugoio#5767
Fixes gohugoio#5723
Fixes gohugoio#5769
Fixes gohugoio#5770
Fixes gohugoio#5771
Fixes gohugoio#5759
Fixes gohugoio#5776
Fixes gohugoio#5777
Fixes gohugoio#5778
@max-arnold
Copy link
Contributor Author

I added the *.rss.html shortcode variants to the same folder and can confirm that this feature works perfectly! Multiple ugly replaceRE in my RSS template are gone.

Thanks a lot, @bep!

@bep
Copy link
Member

bep commented Apr 9, 2019

@max-arnold glad to hear that!

jakejarvis added a commit to jakejarvis/jarv.is that referenced this issue Dec 15, 2019
involves hacky symlinked shortcodes, otherwise AMP version gets chosen. not a bug but maybe file feature request: gohugoio/hugo#5204
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants