squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.02k stars 3.46k forks source link

Remove not hide nav links from Desktop view when Tabs enabled #1235

Closed ghost closed 5 years ago

ghost commented 5 years ago

Description

When the Tabs feature is enabled:

feature:
  tabs: true

L2 (and deeper) links from the nav section are hidden from the user but remain in the HTML. The browser does not show this, but every page links to every other page.

As a consequence “link authority” (SEO term) gets distributed evenly from the site root to all pages on the site.

Expected behavior

Links not displayed to the user are removed from the HTML in the Desktop view. (In Mobile views they are required for navigation.)

By nominating the Desktop bot as the preferred crawler for our site, we would see link authority flowing to the pages most prominent to the visitor.

Actual behavior

Nav links remain in the HTML; link authority dissipates across the site.

Steps to reproduce the bug

  1. Config: ensure nav section contains at least one child level
  2. Config: enable Tabs feature
  3. Compile site and browse in Desktop view
  4. Observe presence in HTML of links not visible to user

Package versions

Project configuration

copyright: 'This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br/>Kx and kdb+ are registered trademarks of <a href="https://kx.com">Kx Systems, Inc.</a>, a subsidiary of <a href="http://www.firstderivatives.com/">First Derivatives plc</a>.'
# dev_addr: '159.65.88.218:8000'
dev_addr: '0.0.0.0:9000'
docs_dir: 'docs'
extra:
  version: 2.0
extra_css: 
  - 'stylesheets/extra.css'
  - 'stylesheets/prism.css'
extra_javascript: 
  # See /syntax/#projection to see if MathJax is working 
  - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML'
  - 'https://code.jquery.com/jquery-3.1.1.min.js'
  - 'https://tracker.mrpfd.com/tracker.js'
  # - 'scripts/googleanalytics.js'
  # - 'https://use.fontawesome.com/3dbf29ed12.js'
  - 'https://use.fontawesome.com/releases/v5.2.0/js/all.js'
  # theme.js modifies HTML to prepare for prism.js
  - 'scripts/theme.js'
  - 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.4.0/clipboard.min.js'
  # Prism script includes plugin Copy to Clipboard http://prismjs.com/download.html
  # Omits plugins Command Line, Line highlight, and Line Numbers: no effect
  - 'scripts/prism.js'
google_analytics:
  - 'UA-3462586-1'
  - 'auto'
markdown_extensions:
  - admonition
  # - codehilite(guess_lang=false)
  - extra
  # - fenced_code
  # - fontawesome_markdown
  - pymdownx.arithmatex
  # - pymdownx.betterem(smart_enable=all)
  # - pymdownx.caret
  # - pymdownx.critic
  # - pymdownx.emoji:
  # emoji_generator: !!python/name:pymdownx.emoji.to_svg
  # - pymdownx.inlinehilite
  - pymdownx.magiclink
  - pymdownx.mark
  # - pymdownx.smartsymbols
  # - pymdownx.superfences
  # - pymdownx.tasklist(custom_checkbox=true)
  - pymdownx.tilde
  - toc:
      permalink: false
plugins: 
  - search
  # - markdownextradata
remote_branch: 'master'
# repo_name: 'GitHub'
# repo_url: 'https://github.com/kxsystems/docs'
site_dir: 'site'
# site_dir: '/var/www/html'
site_author: 'Kx Systems'
site_description: "Kx documentation for kdb+ and the q programming language"
# config.site_name: 'code.kx.com'
site_name: 'Kdb+ and q documentation'
site_url: 'https://code.kx.com/v2'
use_directory_urls: true
theme: 
  custom_dir: custom_theme/
  favicon: ./img/favicon.ico
  feature:
    tabs: true
  name: 'material'
  logo: 'img/kx.jpeg'
  palette: 
    primary: 'blue'
    accent: 'deep orange'
  toc:
    title: "On this page"
nav:
  - Home: index.md
  - Reference: https://code.kx.com/v2/ref/
  - GitHub: github.md
  - Support: support.md
  - Developer tools: devtools.md
  - Wiki: wiki.md
  - Learn: 
    - Get started: learn/index.md
    - Install:
      - Begin here: learn/install/index.md
      - Linux: learn/install/linux.md
      - macOS: learn/install/macos.md
      - Windows: learn/install/windows.md
      - DigitalOcean: learn/install/digitalocean.md
    - Licensing: learn/licensing.md
    - Brief introduction: learn/brief-introduction.md
    - Dictionaries & tables: learn/dicts-tables.md
    - Q by Examples: learn/q-by-examples.md
    - Q for All: learn/q-for-all.md
    - Q for Mortals 3: /q4m3/
    - Q Phrases: /phrases/
    - Remarks on Style:
      - Preface: style/index.md
      - Maxims: style/maxims.md
      - Names: style/names.md
      - Default arguments: style/default-arguments.md
      - Braces: style/braces.md
      - Indentation: style/indentation.md
      - Whitespace: style/whitespace.md
      - Parentheses: style/parentheses.md
      - Line length: style/line-length.md
      - Internal assignment: style/internal-assignment.md
      - Function length: style/function-length.md
      - Function arguments: style/function-arguments.md
      - Modularity: style/modularity.md
      - Communication lines: style/communication-lines.md
      - Comments: style/comments.md
      - Conditionals: style/conditionals.md
      - De-looping: style/de-looping.md
      # - Window scripts and function: 
      # - Reference error hell: 
      - Engine design: style/engine-design.md
      # - Window design:
      # - Connections: 
      # - Dependencies:
      # - Event code
      # - f and g:
      # - Fast loads: fast-loads.md
      - Compose out eaches: style/composition.md
      - Application: style/application.md
      - Defaults: style/defaults.md
      - Projection: style/projection.md
      - Which each?: style/which-each.md
      - What’s in a script?: style/whats-in-a-script.md
      - SAM – A simple application model: style/sam.md
      - New wine for old bottles: style/new-wine.md
      - Omitted pages: style/omitted-pages.md
    - Shifts & scans: learn/shifts-scans.md
    - Starting kdb+: 
      - Overview: learn/startingkdb/index.md
      - The q language: learn/startingkdb/language.md
      - IPC: learn/startingkdb/ipc.md
      - Tables: learn/startingkdb/tables.md
      - Historical database: learn/startingkdb/hdb.md
      - Realtime database: learn/startingkdb/tick.md
    - Views: learn/views.md
    - Archive: learn/archive.md
  - Reference:
    - Reference card: ref/index.md
    - Basics:
      # - Functions: basics/functions.md
      - Application: basics/application.md
      - Atomic functions: basics/atomic.md
      - Casting & encoding: basics/casting.md
      - Comparison: basics/comparison.md
      - Conformability: basics/conformable.md
      - Control: basics/control.md
      - Debugging: basics/debug.md
      - Dictionaries & tables: basics/dictsandtables.md
      # - Elements: basics/elements.md
      - Enumerations: basics/enumerations.md
      - Environment: basics/environment.md
      - Exposed infrastructure: basics/exposed-infrastructure.md
      - Function notation: basics/function-notation.md
      - Functional SQL: basics/funsql.md
      - Iteration: basics/iteration.md
      - Interprocess communication: basics/ipc.md
      - Joins: basics/joins.md
      - Listening port: basics/listening-port.md
      - Logic: basics/logic.md
      - Mathematics: basics/math.md
      - Metadata: basics/metadata.md
      - Namespaces: basics/namespaces.md
      - Parallel processing: basics/peach.md
      - Parse trees: basics/parsetrees.md
      - Precision: basics/precision.md
      - QSQL: basics/qsql.md
      - Search: basics/search.md
      - Selection: basics/selection.md
      - Sorting: basics/sort.md
      - Strings: basics/strings.md
      - Syntax: basics/syntax.md
      - Variadic syntax: basics/variadic.md
    - Command line: basics/cmdline.md
    - Datatypes: basics/datatypes.md
    - Errors: basics/errors.md
    - File system: basics/files.md
    - Glossary: basics/glossary.md
    - Internal functions: basics/internal.md
    - Iterators:
      - Overview: ref/iterators.md
      - Maps: ref/maps.md
      - Accumulators: ref/accumulators.md
    - Keywords:
      - abs: ref/abs.md
      - aj, aj0, ajf, ajf0: ref/aj.md
      - all, any: ref/all-any.md
      - and: ref/and.md
      - asc, iasc, xasc: ref/asc.md
      - asof: ref/asof.md
      - attr: ref/attr.md
      - avg, avgs, mavg, wavg: ref/avg.md
      - bin, binr: ref/bin.md
      - ceiling: ref/ceiling.md
      - count, mcount: ref/count.md
      - cols, xcol, xcols: ref/cols.md
      - cor: ref/cor.md
      - cos, acos: ref/cos.md
      - cov, scov: ref/cov.md
      - cross: ref/cross.md
      - csv: ref/csv.md
      - cut: ref/cut.md
      - delete: ref/delete.md
      - deltas: ref/deltas.md
      - desc, idesc, xdesc: ref/desc.md
      - dev, mdev, sdev: ref/dev.md
      - differ: ref/differ.md
      - distinct: ref/distinct.md
      - div: ref/div.md
      - dsave: ref/dsave.md
      - each, peach: ref/each.md
      - ej: ref/ej.md
      - ema: ref/ema.md
      - enlist: ref/enlist.md
      - eval, reval: ref/eval.md
      - except: ref/except.md
      - exec: ref/exec.md
      - exp, xexp: ref/exp.md
      - fby: ref/fby.md
      - fills: ref/fill.md
      - first, last: ref/first.md
      - fkeys: ref/fkeys.md
      - flip: ref/flip.md
      - floor: ref/floor.md
      - get, set: ref/get.md
      - getenv, setenv: ref/getenv.md
      - group: ref/group.md
      - gtime, ltime: ref/gtime.md
      - hcount, hdel, hopen, hclose, hsym: ref/handles.md
      - ij, ijf: ref/ij.md
      - in: ref/in.md
      - insert: ref/insert.md
      - inter: ref/inter.md
      - inv: ref/inv.md
      - key: ref/key.md
      - keys, xkey: ref/keys.md
      - like: ref/like.md
      - lj, ljf: ref/lj.md
      - load, rload: ref/load.md
      - log, xlog: ref/log.md
      - lower: ref/lower.md
      - lsq: ref/lsq.md
      - max, maxs, mmax: ref/max.md
      - md5: ref/md5.md
      - med: ref/med.md
      - meta: ref/meta.md
      - min, mins, mmin: ref/min.md
      - mmu: ref/mmu.md
      - mod: ref/mod.md
      - neg: ref/neg.md
      - next, prev, xprev: ref/next.md
      - not: ref/not.md
      - 'null': ref/null.md
      - or: ref/or.md
      - over, scan: ref/over.md
      - parse: ref/parse.md
      - pj: ref/pj.md
      - prd, prds: ref/prd.md
      - prior: ref/prior.md
      - rand: ref/rand.md
      - rank: ref/rank.md
      - ratios: ref/ratios.md
      - raze: ref/raze.md
      - read0: ref/read0.md
      - read1: ref/read1.md
      - reciprocal: ref/reciprocal.md
      - reverse: ref/reverse.md
      - rotate: ref/rotate.md
      - save, rsave: ref/save.md
      - select: ref/select.md
      - show: ref/show.md 
      - signum: ref/signum.md 
      - sin, asin: ref/sin.md
      - sqrt: ref/sqrt.md
      - ss, ssr: ref/ss.md
      - string: ref/string.md
      - sublist: ref/sublist.md
      - sum, sums, msum, wsum: ref/sum.md
      - sv: ref/sv.md
      - system: ref/system.md
      - tables: ref/tables.md
      - tan, atan: ref/tan.md
      - til: ref/til.md
      - trim, ltrim, rtrim: ref/trim.md
      - type: ref/type.md
      - uj, ujf: ref/uj.md
      - union: ref/union.md
      - ungroup: ref/ungroup.md
      - update: ref/update.md
      - upsert: ref/upsert.md
      - value: ref/value.md
      - var, svar: ref/var.md
      - view, views: ref/view.md
      - vs: ref/vs.md
      - where: ref/where.md
      - within: ref/within.md
      - wj, wj1: ref/wj.md
      - xbar: ref/xbar.md
      - xgroup: ref/xgroup.md
      - xrank: ref/xrank.md
    - Operators:
      - Overloaded glyphs: ref/overloads.md
      - Add: ref/add.md
      - Amend: ref/amend.md
      - Apply, Index, Trap: ref/apply.md
      - Cast: ref/cast.md
      - Coalesce: ref/coalesce.md
      - Compose: ref/compose.md
      - Cond: ref/cond.md
      - Cut: ref/cut.md
      - Deal, Roll, Permute: ref/deal.md
      - Delete: ref/delete.md
      - Display: ref/display.md 
      - Dict: ref/dict.md
      - Divide: ref/divide.md
      - Display: ref/display.md
      - Dynamic Load: ref/dynamic-load.md
      - Drop: ref/drop.md
      - Enkey, Unkey: ref/enkey.md
      - Enumerate: ref/enumerate.md
      - Enumeration: ref/enumeration.md
      - Enum Extend: ref/enum-extend.md
      - Equal: ref/equal.md
      - Exec: ref/exec.md
      - File Binary: ref/file-binary.md
      - File Text: ref/file-text.md
      - Fill: ref/fill.md
      - Find: ref/find.md
      - Flip Splayed: ref/flip-splayed.md
      - Greater: ref/greater.md
      - Greater Than: ref/greater-than.md
      - Identity, Null: ref/identity.md
      - Join: ref/join.md
      - Less Than: ref/less-than.md
      - Lesser: ref/lesser.md
      - Match: ref/match.md
      - Matrix Multiply: ref/mmu.md
      - Multiply: ref/multiply.md
      - Not Equal: ref/not-equal.md
      - Pad: ref/pad.md
      - Select: ref/select.md
      - Set Attribute: ref/set-attribute.md
      - Simple Exec: ref/simple-exec.md
      - Signal: ref/signal.md
      - Subtract: ref/subtract.md
      - Take: ref/take.md
      - Tok: ref/tok.md
      - Update: ref/update.md
      - Vector Conditional: ref/vector-conditional.md
    - Control words:
      - do: ref/do.md
      - exit: ref/exit.md
      - if: ref/if.md
      - while: ref/while.md
    - Namespaces:
      - .h: ref/doth.md
      - .j: ref/dotj.md
      - .Q: ref/dotq.md
      - .z: ref/dotz.md
    - Release notes:
      - Changes in 3.6: releases/ChangesIn3.6.md
      - Changes in 3.5: releases/ChangesIn3.5.md
      - Changes in 3.4: releases/ChangesIn3.4.md
      - Changes in 3.3: releases/ChangesIn3.3.md
      - Changes in 3.2: releases/ChangesIn3.2.md
      - Changes in 3.1: releases/ChangesIn3.1.md
      - Changes in 3.0: releases/ChangesIn3.0.md
      - Changes in 2.8: releases/ChangesIn2.8.md
      - Changes in 2.7: releases/ChangesIn2.7.md
      - Changes in 2.6: releases/ChangesIn2.6.md
      - Changes in 2.5: releases/ChangesIn2.5.md
      - Changes in 2.4: releases/ChangesIn2.4.md
      - Withdrawn: releases/withdrawn.md
    - System commands: basics/syscmds.md
  - Interfaces:
    - Index: interfaces/index.md
    - Fusion for kdb+:
      - Overview: interfaces/fusion.md
      - FFI: interfaces/ffi.md
      - Java: interfaces/java-client-for-q.md
      - Jupyter: interfaces/jupyterq.md
      - Kafka: interfaces/kafka.md
      - Python (embedPy): interfaces/embedpy.md
      - Python (PyQ):
        - Quick start: interfaces/pyq/index.md
        - Installation: interfaces/pyq/install.md
        - User guide: interfaces/pyq/user-guide.md
        - Reference: interfaces/pyq/reference.md
        - What’s new: interfaces/pyq/whats-new.md
        - Version history: interfaces/pyq/history.md
      - R: interfaces/with-r.md
    - From: 
      - C: interfaces/c-client-for-q.md
      - C API reference: interfaces/capiref.md
      - C#: interfaces/csharp-client-for-q.md
      - Excel: interfaces/excel-client-for-q.md
      - J: interfaces/j-client-for-q.md
      - JDBC: interfaces/jdbc-client-for-kdb.md
      - Matlab: interfaces/matlab-client-for-q.md
      - ODBC/Simba: interfaces/odbc-simba.md
      - ODBC3: interfaces/q-server-for-odbc3.md 
      - Perl: interfaces/perl-client-for-q.md 
      - Scala: interfaces/scala-client-for-q.md 
    - To: 
      - Bloomberg: interfaces/q-client-for-bloomberg.md
      - C/C++ functions: interfaces/using-c-functions.md
      - GPUs: interfaces/gpus.md
      - J: interfaces/q-client-for-j.md
      - ODBC: interfaces/q-client-for-odbc.md
  - Cloud: 
    - Amazon EC2: 
      - Migrating a kdb+ HDB to Amazon EC2: cloud/aws/index.md
      - A. Elastic Block Store (EBS): cloud/aws/app-a-ebs.md
      - B. EFS (NFS): cloud/aws/app-b-efs-nfs.md
      - C. Amazon Storage Gateway: cloud/aws/app-c-asg.md
      - D. MapR-FS: cloud/aws/app-d-mapr.md
      - E. Goofys: cloud/aws/app-e-goofys.md
      - F. S3FS: cloud/aws/app-f-s3fs.md
      - G. S3QL: cloud/aws/app-g-s3ql.md
      - H. ObjectiveFS: cloud/aws/app-h-objectivefs.md
      - I. WekaIO Matrix: cloud/aws/app-i-wekaio-matrix.md
      - J. Quobyte: cloud/aws/app-j-quobyte.md
    - Google CPM: cloud/gcpm/index.md
  - Machine learning:
    - Overview: ml/index.md
    - Set up: ml/setup.md
    - embedPy: 
      - Overview: ml/embedpy/index.md
      - User guide: ml/embedpy/userguide.md
      - FAQ: ml/embedpy/faq.md
      - Reference: ml/embedpy/reference.md
    - JupyterQ: 
      - Overview: ml/jupyterq/index.md
      - User guide: ml/jupyterq/notebooks.md
      - FAQ: ml/jupyterq/faq.md
    - Demonstration notebooks: ml/notebooks.md
    - Toolkit:
      - Overview: ml/toolkit/index.md
      - Utilities:
        - Metrics: ml/toolkit/utilities/metric.md
        - Preprocessing: ml/toolkit/utilities/preproc.md
        - Utils: ml/toolkit/utilities/util.md
      - FRESH: ml/toolkit/fresh.md  
      - Cross validation: ml/toolkit/xval.md
    - Natural language processing:
      - Overview: ml/nlp/index.md
      - User guide:
        - Data preparation: ml/nlp/userguide/preproc.md
        - Text comparison: ml/nlp/userguide/comparisons.md
        - Clustering: ml/nlp/userguide/clustering.md
        - Data interrogation: ml/nlp/userguide/analysis.md
        - Utilities: ml/nlp/userguide/utils.md
        - Emails: ml/nlp/userguide/emails.md
  - Knowledge Base:
    - Overview: kb/index.md
    - Alternative in-memory layouts: kb/alternative-in-memory-layouts.md
    - Authentication and access: kb/authentication.md
    - Bulk Copy Program: kb/bcp.md
    - Callbacks: kb/callbacks.md
    - Chained tickerplant: kb/chained-tickerplant.md
    - Client-server: kb/client-server.md
    - Compacting HDB sym: kb/compacting-hdb-sym.md
    - Corporate actions: kb/corporate-actions.md
    - CPU affinity: kb/cpu-affinity.md
    - Custom web server: kb/custom-web.md
    - Daemon: kb/daemon.md
    - Deferred response: kb/deferred-response.md
    - FAQ: kb/faq.md
    - FAQ from k4 listbox: kb/faq-listbox.md
    - File compression: kb/file-compression.md
    - Firewalling: kb/firewalling.md
    - Geospatial indexing: kb/geospatial.md
    - inetd, xinetd: kb/inetd.md
    - Interprocess communication: kb/ipc.md
    - Kdb+tick configuration: kb/kdb-tick.md
    - Linear programming: kb/lp.md
    - Linking columns: kb/linking-columns.md
    - Linux production notes: kb/linux-production.md
    - Load balancing: kb/load-balancing.md
    - Loading from large files: kb/loading-from-large-files.md
    - Logging: kb/logging.md
    - Multithreaded input: kb/multithreaded-input.md
    - Named pipes: kb/named-pipes.md
    - ODBC: kb/odbc.md
    - Partitioning: kb/partition.md
    - Performance tips: kb/performance-tips.md
    - Pivoting tables: kb/pivoting-tables.md
    # - Precision: kb/precision.md
    - Programming examples: kb/programming-examples.md
    - Programming idioms: kb/programming-idioms.md
    - Publish and subscribe: kb/publish-subscribe.md
    - Regular expressions: kb/regex.md
    - Server calling client: kb/server-calling-client.md
    - Splayed schema change: kb/splayed-schema-change.md
    - Splayed tables: kb/splayed-tables.md
    - Splaying large files: kb/splaying-large-files.md
    - SSL/TLS: kb/ssl.md
    - Temporal data: kb/temporal-data.md
    - Timezones: kb/timezones.md
    - Unicode: kb/unicode.md
    - Unit tests: kb/unit-tests.md
    - Using .z: kb/using-dotz.md
    - Write-only RDB: kb/w-q.md
    - WebSockets: kb/websockets.md
    - Windows service: kb/windows-service/index.md
  - White papers: 
    - Index: wp/index.md
    - Bitcoin blockchains: wp/blockchain/index.md
    - C API: wp/capi/index.md
    - C# GUIs: wp/gui/index.md
    - Compression: wp/compress/index.md
    - Data recovery for kdb+tick: wp/data-recovery.md
    - Data visualization: wp/data-visualization/index.md
    - Disaster recovery: wp/disaster-recovery/index.md
    - EmbedPy and LASSO:  wp/embedpy-lasso/index.md
    - Exoplanets: wp/exoplanets/index.md
    - Foreign keys: wp/foreign-keys.md
    - Intraday writedown: wp/intraday-writedown/index.md
    - Iterators: wp/iterators/index.md
    - Java API: wp/java-api/index.md
    - Lightning tickerplants: wp/lightning-tickerplants/index.md
    - Market fragmentation: wp/market-fragmentation/index.md
    - Multi partitions: wp/multi-partitioned-dbs/index.md
    - Multi-threading: wp/multi-thread/index.md
    - Neural networks: wp/neural-networks/index.md
    - Parse trees, functional SQL: wp/parse-trees.md
    - Permissions: wp/permissions/index.md
    - Query Routing: wp/query-routing/index.md
    - Query scaling: wp/query-scaling.md
    - Real-time tick subscribers: wp/rt-tick/index.md
    - Signal processing and q: wp/signal-processing/index.md
    - Space weather: wp/space-weather/index.md
    - Working with sym files: wp/symfiles.md
    - WebSockets: wp/websockets/index.md
  - About: 
    - Kx technology: about/kxtechnology.md
    - Search: about/search.md
    - Site news: about/site-news.md
    - This site: about/thissite.md
    - Style guide:
      - Introduction: about/sg/index.md
      - Characters: about/sg/characters.md
      - Miscellaneous: about/sg/miscellaneous.md
      - Style: about/sg/style.md
      - Typography: about/sg/typography.md
      - Terminology: about/sg/terminology.md
    - License agreements:
      - AWS: license/aws.md
      - GCP: license/gcp.md

System information

squidfunk commented 5 years ago

Tabs are only shown for the desktop breakpoint. As soon as the navigation is moved into the drawer (tablet and below), there are no more tabs but the normal navigation. This is by design, as for example the page navigation should work at portrait and landscape orientation on a tablet. They cannot be removed.

ghost commented 5 years ago

Not unexpected – but thanks for the swift response.