Skip to content

Commit

Permalink
docs: fix up 5.x docs navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Aug 25, 2021
1 parent a803885 commit 776fae9
Showing 1 changed file with 41 additions and 39 deletions.
80 changes: 41 additions & 39 deletions docs/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ html(lang='en')
li.pure-menu-horizontal.pure-menu-item.pure-menu-has-children.pure-menu-allow-hover.version
a(href="#").pure-menu-link Version #{package.version}
ul.pure-menu-children
li.pure-menu-item
a.pure-menu-link(href="/docs") Version 6.x
li.pure-menu-item
a.pure-menu-link(href="/docs/4.x") Version #{package.latest4x}
li.pure-menu-item
Expand All @@ -60,86 +62,86 @@ html(lang='en')
button#search-button-nav
img(src="/docs/images/search.svg")
li.pure-menu-item
a.pure-menu-link(href="/docs/index.html", class=outputUrl === '/docs/index.html' ? 'selected' : '') Quick Start
a.pure-menu-link(href="/docs/5.x/docs/index.html", class=outputUrl === '/docs/index.html' ? 'selected' : '') Quick Start
li.pure-menu-item
a.pure-menu-link(href="/docs/guides.html", class=outputUrl === '/docs/guides.html' ? 'selected' : '') Guides
a.pure-menu-link(href="/docs/5.x/docs/guides.html", class=outputUrl === '/docs/guides.html' ? 'selected' : '') Guides
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/guide.html", class=outputUrl === '/docs/schemas.html' ? 'selected' : '') Schemas
a.pure-menu-link(href="/docs/5.x/guide.html", class=outputUrl === '/docs/schemas.html' ? 'selected' : '') Schemas
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/schematypes.html", class=outputUrl === '/docs/schematypes.html' ? 'selected' : '') SchemaTypes
a.pure-menu-link(href="/docs/5.x/schematypes.html", class=outputUrl === '/docs/schematypes.html' ? 'selected' : '') SchemaTypes
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/connections.html", class=outputUrl === '/docs/connections.html' ? 'selected' : '') Connections
a.pure-menu-link(href="/docs/5.x/connections.html", class=outputUrl === '/docs/connections.html' ? 'selected' : '') Connections
- if (['/docs/connections', '/docs/tutorials/ssl'].some(path => outputUrl.startsWith(path)))
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/tutorials/ssl.html", class=outputUrl === '/docs/tutorials/ssl.html' ? 'selected' : '') SSL Connections
a.pure-menu-link(href="/docs/5.x/tutorials/ssl.html", class=outputUrl === '/docs/tutorials/ssl.html' ? 'selected' : '') SSL Connections
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/models.html", class=outputUrl === '/docs/models.html' ? 'selected' : '') Models
a.pure-menu-link(href="/docs/5.x/docs/models.html", class=outputUrl === '/docs/models.html' ? 'selected' : '') Models
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/documents.html", class=outputUrl === '/docs/documents.html' ? 'selected' : '') Documents
a.pure-menu-link(href="/docs/5.x/docs/documents.html", class=outputUrl === '/docs/documents.html' ? 'selected' : '') Documents
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/subdocs.html", class=outputUrl === '/docs/subdocs.html' ? 'selected' : '') Subdocuments
a.pure-menu-link(href="/docs/5.x/docs/subdocs.html", class=outputUrl === '/docs/subdocs.html' ? 'selected' : '') Subdocuments
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/queries.html", class=outputUrl === '/docs/queries.html' ? 'selected' : '') Queries
a.pure-menu-link(href="/docs/5.x/docs/queries.html", class=outputUrl === '/docs/queries.html' ? 'selected' : '') Queries
- if (['/docs/queries', '/docs/tutorials/findoneandupdate', '/docs/tutorials/lean', '/docs/tutorials/query_casting'].some(path => outputUrl.startsWith(path)))
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/tutorials/query_casting.html", class=outputUrl === '/docs/tutorials/query_casting.html' ? 'selected' : '') Query Casting
a.pure-menu-link(href="/docs/5.x/docs/tutorials/query_casting.html", class=outputUrl === '/docs/tutorials/query_casting.html' ? 'selected' : '') Query Casting
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/tutorials/findoneandupdate.html", class=outputUrl === '/docs/tutorials/findoneandupdate.html' ? 'selected' : '') findOneAndUpdate
a.pure-menu-link(href="/docs/5.x/docs/tutorials/findoneandupdate.html", class=outputUrl === '/docs/tutorials/findoneandupdate.html' ? 'selected' : '') findOneAndUpdate
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/tutorials/lean.html", class=outputUrl === '/docs/tutorials/lean.html' ? 'selected' : '') The Lean Option
a.pure-menu-link(href="/docs/5.x/docs/tutorials/lean.html", class=outputUrl === '/docs/tutorials/lean.html' ? 'selected' : '') The Lean Option
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/validation.html", class=outputUrl === '/docs/validation.html' ? 'selected' : '') Validation
a.pure-menu-link(href="/docs/5.x/docs/validation.html", class=outputUrl === '/docs/validation.html' ? 'selected' : '') Validation
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/middleware.html", class=outputUrl === '/docs/middleware.html' ? 'selected' : '') Middleware
a.pure-menu-link(href="/docs/5.x/docs/middleware.html", class=outputUrl === '/docs/middleware.html' ? 'selected' : '') Middleware
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/populate.html", class=outputUrl === '/docs/populate.html' ? 'selected' : '') Populate
a.pure-menu-link(href="/docs/5.x/docs/populate.html", class=outputUrl === '/docs/populate.html' ? 'selected' : '') Populate
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/discriminators.html", class=outputUrl === '/docs/discriminators.html' ? 'selected' : '') Discriminators
a.pure-menu-link(href="/docs/5.x/docs/discriminators.html", class=outputUrl === '/docs/discriminators.html' ? 'selected' : '') Discriminators
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/plugins.html", class=outputUrl === '/docs/plugins.html' ? 'selected' : '') Plugins
a.pure-menu-link(href="/docs/5.x/docs/plugins.html", class=outputUrl === '/docs/plugins.html' ? 'selected' : '') Plugins
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/transactions.html", class=outputUrl === '/docs/transactions.html' ? 'selected' : '') Transactions
a.pure-menu-link(href="/docs/5.x/docs/transactions.html", class=outputUrl === '/docs/transactions.html' ? 'selected' : '') Transactions
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/typescript.html", class=outputUrl === '/docs/typescript.html' ? 'selected' : '') TypeScript
a.pure-menu-link(href="/docs/5.x/docs/typescript.html", class=outputUrl === '/docs/typescript.html' ? 'selected' : '') TypeScript
- if (outputUrl.startsWith('/docs/typescript'))
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/typescript/schemas.html", class=outputUrl === '/docs/typescript/schemas.html' ? 'selected' : '') Schemas
a.pure-menu-link(href="/docs/5.x/docs/typescript/schemas.html", class=outputUrl === '/docs/typescript/schemas.html' ? 'selected' : '') Schemas
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/typescript/statics.html", class=outputUrl === '/docs/typescript/statics.html' ? 'selected' : '') Statics
a.pure-menu-link(href="/docs/5.x/docs/typescript/statics.html", class=outputUrl === '/docs/typescript/statics.html' ? 'selected' : '') Statics
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/typescript/query-helpers.html", class=outputUrl === '/docs/typescript/query-helpers.html' ? 'selected' : '') Query Helpers
a.pure-menu-link(href="/docs/5.x/docs/typescript/query-helpers.html", class=outputUrl === '/docs/typescript/query-helpers.html' ? 'selected' : '') Query Helpers
li.pure-menu-item.tertiary-item
a.pure-menu-link(href="/docs/typescript/populate.html", class=outputUrl === '/docs/typescript/populate.html' ? 'selected' : '') Populate
a.pure-menu-link(href="/docs/5.x/docs/typescript/populate.html", class=outputUrl === '/docs/typescript/populate.html' ? 'selected' : '') Populate
li.pure-menu-item
a.pure-menu-link(href="/docs/api.html", class=outputUrl === '/docs/api.html' ? 'selected' : '') API
a.pure-menu-link(href="/docs/5.x/docs/api.html", class=outputUrl === '/docs/api.html' ? 'selected' : '') API
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/mongoose.html", class=outputUrl === '/docs/api/mongoose.html' ? 'selected' : '') Mongoose
a.pure-menu-link(href="/docs/5.x/docs/api/mongoose.html", class=outputUrl === '/docs/api/mongoose.html' ? 'selected' : '') Mongoose
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/schema.html", class=outputUrl === '/docs/api/schema.html' ? 'selected' : '') Schema
a.pure-menu-link(href="/docs/5.x/docs/api/schema.html", class=outputUrl === '/docs/api/schema.html' ? 'selected' : '') Schema
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/connection.html", class=outputUrl === '/docs/api/connection.html' ? 'selected' : '') Connection
a.pure-menu-link(href="/docs/5.x/docs/api/connection.html", class=outputUrl === '/docs/api/connection.html' ? 'selected' : '') Connection
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/document.html", class=outputUrl === '/docs/api/document.html' ? 'selected' : '') Document
a.pure-menu-link(href="/docs/5.x/docs/api/document.html", class=outputUrl === '/docs/api/document.html' ? 'selected' : '') Document
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/model.html", class=outputUrl === '/docs/api/model.html' ? 'selected' : '') Model
a.pure-menu-link(href="/docs/5.x/docs/api/model.html", class=outputUrl === '/docs/api/model.html' ? 'selected' : '') Model
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/query.html", class=outputUrl === '/docs/api/query.html' ? 'selected' : '') Query
a.pure-menu-link(href="/docs/5.x/docs/api/query.html", class=outputUrl === '/docs/api/query.html' ? 'selected' : '') Query
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/aggregate.html", class=outputUrl === '/docs/api/aggregate.html' ? 'selected' : '') Aggregate
a.pure-menu-link(href="/docs/5.x/docs/api/aggregate.html", class=outputUrl === '/docs/api/aggregate.html' ? 'selected' : '') Aggregate
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/schematype.html", class=outputUrl === '/docs/api/schematype.html' ? 'selected' : '') SchemaType
a.pure-menu-link(href="/docs/5.x/docs/api/schematype.html", class=outputUrl === '/docs/api/schematype.html' ? 'selected' : '') SchemaType
li.pure-menu-item.sub-item
a.pure-menu-link(href="/docs/api/virtualtype.html", class=outputUrl === '/docs/api/virtualtype.html' ? 'selected' : '') VirtualType
a.pure-menu-link(href="/docs/5.x/docs/api/virtualtype.html", class=outputUrl === '/docs/api/virtualtype.html' ? 'selected' : '') VirtualType
li.pure-menu-item
a.pure-menu-link(href="/docs/compatibility.html", class=outputUrl === '/docs/compatibility.html' ? 'selected' : '') Version Compatibility
a.pure-menu-link(href="/docs/5.x/docs/compatibility.html", class=outputUrl === '/docs/compatibility.html' ? 'selected' : '') Version Compatibility
li.pure-menu-item
a.pure-menu-link(href="/docs/faq.html", class=outputUrl === '/docs/faq.html' ? 'selected' : '') FAQ
a.pure-menu-link(href="/docs/5.x/docs/faq.html", class=outputUrl === '/docs/faq.html' ? 'selected' : '') FAQ
li.pure-menu-item
a.pure-menu-link(href="/docs/further_reading.html", class=outputUrl === '/docs/further_reading.html' ? 'selected' : '') Further Reading
a.pure-menu-link(href="/docs/5.x/docs/further_reading.html", class=outputUrl === '/docs/further_reading.html' ? 'selected' : '') Further Reading
li.pure-menu-item
a.pure-menu-link(href="/docs/enterprise.html", class=outputUrl === '/docs/enterprise.html' ? 'selected' : '') For Enterprise
a.pure-menu-link(href="/docs/5.x/docs/enterprise.html", class=outputUrl === '/docs/enterprise.html' ? 'selected' : '') For Enterprise
li.pure-menu-item
a.pure-menu-link(href="/docs/built-with-mongoose.html", , class=outputUrl === '/docs/built-with-mongoose.html' ? 'selected' : '') Built with Mongoose
a.pure-menu-link(href="/docs/5.x/docs/built-with-mongoose.html", , class=outputUrl === '/docs/built-with-mongoose.html' ? 'selected' : '') Built with Mongoose
div.cpc-ad
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=mongoosejscom" id="_carbonads_js"></script>
.container
Expand Down

0 comments on commit 776fae9

Please sign in to comment.