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

Add WeightedPages.Page #5719

Closed
bep opened this issue Feb 27, 2019 · 4 comments
Closed

Add WeightedPages.Page #5719

bep opened this issue Feb 27, 2019 · 4 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Feb 27, 2019

I haven't wanted to do this because I didn't know how to without breaking lots of templates in the wild. But while cleaning up some other stuff, I think I found a way.

So taking one example from the docs:

<ul>
    {{ $type := .Type }}
    {{ range $key, $value := .Data.Terms.Alphabetical }}
        {{ $name := .Name }}
        {{ $count := .Count }}
        {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
            <li><a href="{{ .Permalink }}">{{ $name }}</a> {{ $count }}</li>
        {{ end }}
    {{ end }}
</ul>

We should be able to rewrite this as:

<ul>
    {{ range .Data.Terms.Alphabetical }}
            <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
    {{ end }}
</ul>

Note that I have replaced .Name with .Title in the example, because that is probably what you want in most cases. I have removed the preserveTaxonomyNames flag -- this will possibly be slightly breaking for some, but the logic was too hard to maintain -- and you can now use.Title which will preserve what you write in front matter.

/cc @regisphilibert

@bep bep self-assigned this Feb 27, 2019
@bep bep added this to the v0.55 milestone Feb 27, 2019
bep added a commit to bep/hugo that referenced this issue Feb 27, 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
@regisphilibert
Copy link
Member

This is great!

But while cleaning up some other stuff, I think I found a way.

Could this finding by any chance allow this improvement to be applied to the .Site.Taxonomy object as in:

<ul>
    {{ range .Site.Taxonomies.tags }}
            <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
    {{ end }}
</ul>

bep added a commit to bep/hugo that referenced this issue Feb 28, 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
bep added a commit to bep/hugo that referenced this issue Mar 7, 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
bep added a commit to bep/hugo that referenced this issue Mar 7, 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
bep added a commit to bep/hugo that referenced this issue Mar 8, 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
bep added a commit to bep/hugo that referenced this issue Mar 12, 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 12, 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 12, 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 13, 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 13, 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 14, 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 14, 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 16, 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 16, 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 16, 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#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
Copy link
Member Author

bep commented Mar 19, 2019

Could this finding by any chance allow this improvement to be applied to the .Site.Taxonomy object as in:

@regisphilibert yes. I just added a test for both the above constructs:

https://github.com/bep/hugo/blob/cdcc7de233ef74a386d54d766d18c6b84e078043/hugolib/taxonomy_test.go#L284

So, the loops gets nicer, but look at the titles!

@regisphilibert
Copy link
Member

Awesome !

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
@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 19, 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

2 participants