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

Improve .Site.GetPage so it can get a specific regular content page #2844

Closed
bep opened this issue Dec 28, 2016 · 4 comments · Fixed by #3524
Closed

Improve .Site.GetPage so it can get a specific regular content page #2844

bep opened this issue Dec 28, 2016 · 4 comments · Fixed by #3524

Comments

@bep
Copy link
Member

bep commented Dec 28, 2016

See https://discuss.gohugo.io/t/can-we-use-hugo-commands-in-markdown-files/4937/2

@bep bep changed the title Improve GetPage so it can get a specific regular content page Improve .Site.GetPage so it can get a specific regular content page Dec 28, 2016
@bep
Copy link
Member Author

bep commented Dec 28, 2016

We should probably build some kind of index (a map?) if this is going to be used a lot.

@bep bep added this to the v0.19 milestone Jan 5, 2017
@bep bep modified the milestones: v0.20, v0.19 Feb 21, 2017
@bep bep modified the milestones: v0.21, v0.20 Mar 31, 2017
@vjeantet
Copy link
Contributor

vjeantet commented May 5, 2017

Maybe we can use last outputFormats feature to generate the required "index" ?

I try to generate a json file with all the information about pages, it generates the correct file in public/idx/pages.json but impossible to use/reference this file in templates with GetJSON (egg and chicken problem ?)

Is there a way to generate an outputFormat to data dir ?

Is there a way to order outputFormats'runs ? (to be sure that my generated data files are created before used by other templates..)

[outputFormats.IDXPAGES]
MediaType = "application/json"
BaseName = "pages"
IsPlainText = true
Path = "idx"

@bep
Copy link
Member Author

bep commented May 5, 2017

(egg and chicken problem ?)

Yes. Output format is a rendering format, so your thoughts would only make sense if you build the site several times and route the output to data to first n times ...

But in any case, what you are talking about (not sure what) is not covered by this issue, and probably belong in discussion form.

@bep bep modified the milestones: v0.22, v0.21 May 9, 2017
@bep bep self-assigned this May 25, 2017
@bep bep added the InProgress label May 25, 2017
bep added a commit to bep/hugo that referenced this issue May 26, 2017
@bep bep closed this as completed in #3524 May 26, 2017
bep added a commit that referenced this issue May 26, 2017
@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 Mar 19, 2022
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.

2 participants