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

Make Node a Page #2649

Merged
merged 45 commits into from
Nov 22, 2016
Merged

Make Node a Page #2649

merged 45 commits into from
Nov 22, 2016

Conversation

bep
Copy link
Member

@bep bep commented Oct 30, 2016

  • Basic test and types
  • Handle home page
  • Handle sections
  • Handle taxonomy lists
  • Handle taxonomy terms
  • Create pages for missing content files for sections etc.
  • Get Rebuild up to speed
  • Taxonomies in home page etc?
  • Content and page metadata in paginator pages? Fix in Consider adding .Content and page metadata to paginator pages #2682
  • Expose a GetPage(NodeType, path...) on SiteInfo or similar ...
  • Handle aliases
  • Handle menus
  • Menu definitions in home page etc?
  • Alias definitions in home page etc?
  • Handle RSS
  • Handle sitemaps
  • Handle sections with only _index.md
  • Include all node types in sitemap template, fixes Sitemap.xml should include nodes, as well as pages #1303
  • Check Date, Lastmod on nodes
  • Drafts etc.
  • Handle 404
  • Handle robots.txt
  • Handle translations
  • Fix the All* slices, add others? AllNodes?
  • Check where vs NodeType
  • Add NodeContent path setting default to /Content Fix in Add nodeContentPath setting default to /content #2680
  • Node Content from themes? Fix in Support node content from themes #2681
  • Do the TODO(bep) np
  • Remove old and dead code
  • Remove Nodes, AllNodes (=> Pages), NodeType => PageType, PageType = string, so we can query it: home, section, taxonomy, taxonomyTerm. Data.Pages => .Pages and a mild deprecation (no ERROR)
  • Rename PageType=> Kind
  • Update RSSlink => RSSLink in themes and test the theme site
  • Compare /docs site before/after
  • Check sitemap sorting / stability
  • Don't write taxonomy terms page if no layout for it / i.e. how it is today
  • Docs site: /tools/index.html is rendered empty
  • Check multilingual _index.md
  • Do Docs
  • Add some lines to the release notes while it is fresh
  • Check theme templates for sections etc.
    ++

Fixes #2297

@bep bep force-pushed the node-vs-page branch 12 times, most recently from fb38bf0 to 53ebb33 Compare November 5, 2016 17:55
@bep bep force-pushed the node-vs-page branch 2 times, most recently from 220fc56 to 0cc62bc Compare November 8, 2016 20:25
@bep bep self-assigned this Nov 8, 2016
@bep bep added this to the v0.18 milestone Nov 8, 2016
@bep bep added the Enhancement label Nov 8, 2016
@bep
Copy link
Member Author

bep commented Nov 9, 2016

The tests are all green -- and this actually works now. Still many loose ends to tie, but it looks promising.

And faster:

benchmark           old ns/op       new ns/op       delta
BenchmarkHugo-4     12606861551     11300837482     -10.36%

benchmark           old allocs     new allocs     delta
BenchmarkHugo-4     48522596       48506418       -0.03%

benchmark           old bytes      new bytes      delta
BenchmarkHugo-4     9800844224     9791154400     -0.10%

@bep
Copy link
Member Author

bep commented Nov 14, 2016

Removing the Node had further positive impact on speed, I believe the value embedding created some extra copies.

This compares Hugo master with this branch:

benchmark           old ns/op       new ns/op       delta
BenchmarkHugo-4     12763741678     10800430319     -15.38%

benchmark           old allocs     new allocs     delta
BenchmarkHugo-4     48522867       42625712       -12.15%

benchmark           old bytes      new bytes      delta
BenchmarkHugo-4     9796458336     9492564016     -3.10%

And embed that on Page.

Updates gohugoio#2297
Having a custom string type isn't worth it when it doesn't work
with `where`, `eq` etc.

Fixes gohugoio#2689
Updates gohugoio#2297
And misc. TODO-fixes

Updates gohugoio#2297
This includes removing the error return value from Permalink and RelPermalink.

We ignore that error all over the place, so we might as well remove it.

Updates gohugoio#2297
By embeding the init sync.Once var in a pointer so we can reset it when we copy the page.

Updates gohugoio#2297
Returning all types is both confusing and too breaking.

All page types can be fetched in .Site.Pages.

Updates gohugoio#2297
Some sites, Hugo docs included, have faulty alias definitions that point
to itself or another real page. These will be overwritten in the next step.

This is how it behaves in Hugo 0.17, too.

Updates gohugoio#2297
Because it is the right solution and it the avoids naming conflict with section vs page.

Updates gohugoio#2297
And some other minor doc fixes.

Closes gohugoio#2297
Closes gohugoio#2649
@bep bep removed the NeedsTriage label Nov 22, 2016
@bep bep merged commit a5b3b07 into gohugoio:master Nov 22, 2016
@n10v n10v mentioned this pull request Nov 23, 2016
@bep bep deleted the node-vs-page branch April 18, 2017 09:19
@github-actions
Copy link

This pull request 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 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Node vs Page Sitemap.xml should include nodes, as well as pages
2 participants