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

A way to access content after <!--more--> marker #716

Closed
ghost opened this issue Dec 15, 2014 · 18 comments
Closed

A way to access content after <!--more--> marker #716

ghost opened this issue Dec 15, 2014 · 18 comments

Comments

@ghost
Copy link

ghost commented Dec 15, 2014

Currently one can get either the summary (.Summary) or all the content (.Content), but there's no way to access only the content after the marker, through a variable like .MoreContent, for example. In my case the summary and the rest are completely separate entities.

@anthonyfok
Copy link
Member

Hi @opennota,
Is there a reason why you closed this issue before it was fixed? :-)

@ghost
Copy link
Author

ghost commented Mar 13, 2015

@anthonyfok I don't need it anymore, and it doesn't look like anyone else is interested.

@abirger
Copy link

abirger commented Mar 13, 2015

@opennota, actually I would very much like this feature. I missed #716 and #718 in the first place, and I am glad that I've seen them now.

@anthonyfok
Copy link
Member

Let's reopen this issue then! ;-)

@anthonyfok anthonyfok reopened this Mar 13, 2015
@bep
Copy link
Member

bep commented Mar 13, 2015

+1

@anthonyfok anthonyfok added this to the v0.14 milestone Mar 13, 2015
@Dr-Terrible
Copy link

Dr-Terrible commented May 6, 2015

It would be nice to have both .Summary (only the summary) and .Footnotes (only the footnotes generated by blackfriday) coupled with .Body( .Content minus .Summary, minus .Footnotes) too.

@bep
Copy link
Member

bep commented May 7, 2015

@Dr-Terrible for the BF related issues, see russross/blackfriday#166

@Dr-Terrible
Copy link

@bep Thank you, your idea about separate entities makes more sense. I didn't think about the ToC either.

@anthonyfok anthonyfok modified the milestones: v0.15, v0.14 Sep 16, 2015
@anthonyfok anthonyfok modified the milestones: v0.16, v0.15 Nov 30, 2015
@moorereason moorereason modified the milestones: future, v0.16 May 7, 2016
@matthewdolman
Copy link

+1

I would like this. In fact the more that we can define sections in our content the better.

@matthewdolman
Copy link

If anyone is looking for a quick workaround for now you can do this:

{{ $body := replace .Content .Summary "" }}
{{ $body | safeHTML }}

@bep
Copy link
Member

bep commented Feb 28, 2017

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

@bep bep added the Stale label Feb 28, 2017
@bep
Copy link
Member

bep commented Mar 1, 2017

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

@bep bep added Keep and removed Stale labels Apr 9, 2017
@f3l1x
Copy link

f3l1x commented Jun 7, 2017

I like an idea. 👍 What can I do for it?

@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
@bep bep modified the milestones: v0.129.0, v0.131.0 Jul 22, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
bep added a commit to bep/hugo that referenced this issue Aug 23, 2024
bep added a commit to bep/hugo that referenced this issue Aug 25, 2024
bep added a commit to bep/hugo that referenced this issue Aug 28, 2024
bep added a commit to bep/hugo that referenced this issue Aug 28, 2024
bep added a commit to bep/hugo that referenced this issue Aug 28, 2024
bep added a commit to bep/hugo that referenced this issue Aug 28, 2024
bep added a commit to bep/hugo that referenced this issue Aug 28, 2024
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
bep added a commit to bep/hugo that referenced this issue Aug 29, 2024
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes gohugoio#8680
Fixes gohugoio#12761
Fixes gohugoio#12778
Fixes gohugoio#716
@bep bep closed this as completed in 3760926 Aug 29, 2024
@bep bep modified the milestones: v0.133.0, v0.134.0 Aug 29, 2024
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 Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

13 participants