Contribution guidelines
I've found a bug and checked that ...
Description
Trying to do some theme development. Set up the dev environment as documented here: https://squidfunk.github.io/mkdocs-material/customization/#theme-development
I run npm start, and it starts without error.
I make a change to a file in the theme, and it spits out an error (see below).
Expected behaviour
File changes do not cause npm to crash.
Actual behaviour
Error output:
npm start
> mkdocs-material@8.2.13 start /home/jarad/work/rbb-docs/mkdocs-material
> ts-node -T tools/build --verbose --all --dirty --watch
14:01:07 + material/assets/stylesheets/main.css.map
14:01:07 + material/assets/stylesheets/main.css
14:01:08 + material/assets/stylesheets/palette.css.map
14:01:08 + material/assets/stylesheets/palette.css
14:01:08 + material/assets/javascripts/bundle.js
14:01:08 + material/assets/javascripts/bundle.js.map
14:01:08 + material/overrides/assets/stylesheets/main.css.map
14:01:08 + material/overrides/assets/stylesheets/main.css
14:01:08 + material/assets/javascripts/workers/search.js
14:01:08 + material/assets/javascripts/workers/search.js.map
14:01:08 + material/overrides/assets/javascripts/bundle.js
14:01:08 + material/overrides/assets/javascripts/bundle.js.map
14:01:08 + material/base.html
14:01:08 + material/404.html
14:01:08 + material/main.html
14:01:08 + material/overrides/blog.html
14:01:08 + material/overrides/home.html
14:01:08 + material/overrides/main.html
14:01:08 + material/overrides/partials/content.html
14:01:08 + material/partials/content.html
14:01:08 + material/partials/copyright.html
14:01:08 + material/partials/footer.html
14:01:08 + material/partials/header.html
14:01:08 + material/partials/integrations/analytics.html
14:01:08 + material/partials/javascripts/outdated.html
14:01:08 + material/partials/javascripts/palette.html
14:01:08 + material/partials/javascripts/base.html
14:01:08 + material/partials/integrations/analytics/google.html
14:01:08 + material/partials/language.html
14:01:08 + material/partials/languages/af.html
14:01:08 + material/partials/languages/bg.html
14:01:08 + material/partials/languages/bn.html
14:01:08 + material/partials/languages/ca.html
14:01:08 + material/partials/languages/cs.html
14:01:08 + material/partials/languages/da.html
14:01:08 + material/partials/languages/de.html
14:01:08 + material/partials/languages/el.html
14:01:08 + material/partials/languages/ar.html
14:01:08 + material/partials/languages/en.html
14:01:08 + material/partials/languages/es.html
14:01:08 + material/partials/languages/et.html
14:01:08 + material/partials/languages/fa.html
14:01:08 + material/partials/languages/eo.html
14:01:08 + material/partials/languages/fi.html
14:01:08 + material/partials/languages/fr.html
14:01:08 + material/partials/languages/gl.html
14:01:08 + material/partials/languages/he.html
14:01:08 + material/partials/languages/hi.html
14:01:08 + material/partials/languages/hr.html
14:01:08 + material/partials/languages/id.html
14:01:08 + material/partials/languages/hu.html
14:01:08 + material/partials/languages/is.html
14:01:08 + material/partials/languages/it.html
14:01:08 + material/partials/languages/ka.html
14:01:08 + material/partials/languages/kr.html
14:01:08 + material/partials/languages/lv.html
14:01:08 + material/partials/languages/mk.html
14:01:08 + material/partials/languages/ja.html
14:01:08 + material/partials/languages/mn.html
14:01:08 + material/partials/languages/ms.html
14:01:08 + material/partials/languages/my.html
14:01:08 + material/partials/languages/nl.html
14:01:08 + material/partials/languages/nn.html
14:01:08 + material/partials/languages/no.html
14:01:08 + material/partials/languages/pt-BR.html
14:01:08 + material/partials/languages/pt.html
14:01:08 + material/partials/languages/ro.html
14:01:08 + material/partials/languages/ru.html
14:01:08 + material/partials/languages/pl.html
14:01:08 + material/partials/languages/sh.html
14:01:08 + material/partials/languages/si.html
14:01:08 + material/partials/languages/sk.html
14:01:08 + material/partials/languages/sl.html
14:01:08 + material/partials/languages/sr.html
14:01:08 + material/partials/languages/sv.html
14:01:08 + material/partials/languages/th.html
14:01:08 + material/partials/languages/tr.html
14:01:08 + material/partials/languages/uk.html
14:01:08 + material/partials/languages/vi.html
14:01:08 + material/partials/languages/zh-Hant.html
14:01:08 + material/partials/languages/zh-TW.html
14:01:08 + material/partials/languages/zh.html
14:01:08 + material/partials/logo.html
14:01:08 + material/partials/nav-item.html
14:01:08 + material/partials/nav.html
14:01:08 + material/partials/palette.html
14:01:08 + material/partials/search.html
14:01:08 + material/partials/social.html
14:01:08 + material/partials/source.html
14:01:08 + material/partials/tabs-item.html
14:01:08 + material/partials/source-file.html
14:01:08 + material/partials/tabs.html
14:01:08 + material/partials/tags.html
14:01:08 + material/partials/toc-item.html
14:01:08 + material/partials/toc.html
/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71
innerFrom(project(value, index++)).subscribe(
^
TypeError: file.replace is not a function
at /home/jarad/work/rbb-docs/mkdocs-material/tools/build/copy/index.ts:108:37
at doInnerSub (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:15)
at outerNext (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58)
at OperatorSubscriber._this._next (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
at OperatorSubscriber.Subscriber.next (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
at /home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24
at OperatorSubscriber._this._next (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
at OperatorSubscriber.Subscriber.next (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
at FSWatcher.handler (/home/jarad/work/rbb-docs/mkdocs-material/node_modules/rxjs/src/internal/observable/fromEvent.ts:288:52)
at FSWatcher.emit (events.js:400:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mkdocs-material@8.2.13 start: `ts-node -T tools/build --verbose --all --dirty --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mkdocs-material@8.2.13 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jarad/.npm/_logs/2022-05-05T20_01_12_976Z-debug.log
Steps to reproduce
- Set up dev environment
npm start
- Change a file
Package versions
- Python: 3.9.5
- MkDocs: 1.3.0
- Material: git clone, branch master, hash d219ae2
Configuration
# Copyright (c) 2016-2022 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Project information
site_name: Material for MkDocs
site_url: https://squidfunk.github.io/mkdocs-material/
site_author: Martin Donath
site_description: >-
Create a branded static site from a set of Markdown files to host the
documentation of your Open Source or commercial project
# Repository
repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material
# Copyright
copyright: Copyright © 2016 - 2022 Martin Donath
# Configuration
theme:
name: null
custom_dir: !ENV [THEME_DIR, "material"]
# Static files
static_templates:
- 404.html
# Don't include MkDocs' JavaScript
include_search_page: false
search_index_only: true
# Default values, taken from mkdocs_theme.yml
language: en
features:
- content.code.annotate
# - content.tabs.link
# - header.autohide
# - navigation.expand
- navigation.indexes
# - navigation.instant
- navigation.sections
- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate
palette:
- scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/toggle-switch
name: Switch to dark mode
- scheme: slate
primary: red
accent: red
toggle:
icon: material/toggle-switch-off-outline
name: Switch to light mode
font:
text: Roboto
code: Roboto Mono
favicon: assets/favicon.png
icon:
logo: logo
# Plugins
plugins:
- search
- redirects:
redirect_maps:
changelog/insiders.md: insiders/changelog.md
conventions.md: philosophy.md
reference/meta-tags.md: reference/index.md
reference/variables.md: https://mkdocs-macros-plugin.readthedocs.io/
sponsorship.md: insiders/index.md
upgrading.md: upgrade.md
- minify:
minify_html: true
# Customization
extra:
analytics:
provider: google
property: !ENV GOOGLE_ANALYTICS_KEY
social:
- icon: fontawesome/brands/github
link: https://github.com/squidfunk
- icon: fontawesome/brands/gitter
link: https://gitter.im/squidfunk/mkdocs-material
- icon: fontawesome/brands/docker
link: https://hub.docker.com/r/squidfunk/mkdocs-material/
- icon: fontawesome/brands/python
link: https://pypi.org/project/mkdocs-material/
- icon: fontawesome/brands/twitter
link: https://twitter.com/squidfunk
# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- def_list
- footnotes
- meta
- md_in_html
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:materialx.emoji.twemoji
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
# Page tree
nav:
- Home: index.md
- Getting started:
- Installation: getting-started.md
- Creating your site: creating-your-site.md
- Publishing your site: publishing-your-site.md
- Customization: customization.md
- Browser support: browser-support.md
- Philosophy: philosophy.md
- Alternatives: alternatives.md
- License: license.md
- Changelog:
- changelog/index.md
- How to upgrade: upgrade.md
- Setup:
- Changing the colors: setup/changing-the-colors.md
- Changing the fonts: setup/changing-the-fonts.md
- Changing the language: setup/changing-the-language.md
- Changing the logo and icons: setup/changing-the-logo-and-icons.md
- Ensuring data privacy: setup/ensuring-data-privacy.md
- Setting up navigation: setup/setting-up-navigation.md
- Setting up site search: setup/setting-up-site-search.md
- Setting up site analytics: setup/setting-up-site-analytics.md
- Setting up social cards: setup/setting-up-social-cards.md
- Setting up tags: setup/setting-up-tags.md
- Setting up versioning: setup/setting-up-versioning.md
- Setting up the header: setup/setting-up-the-header.md
- Setting up the footer: setup/setting-up-the-footer.md
- Adding a git repository: setup/adding-a-git-repository.md
- Adding a comment system: setup/adding-a-comment-system.md
- Building for offline usage: setup/building-for-offline-usage.md
- Extensions:
- setup/extensions/index.md
- Python Markdown: setup/extensions/python-markdown.md
- Python Markdown Extensions: setup/extensions/python-markdown-extensions.md
- Reference:
- reference/index.md
- Abbreviations: reference/abbreviations.md
- Admonitions: reference/admonitions.md
- Annotations: reference/annotations.md
- Buttons: reference/buttons.md
- Code blocks: reference/code-blocks.md
- Content tabs: reference/content-tabs.md
- Data tables: reference/data-tables.md
- Diagrams: reference/diagrams.md
- Footnotes: reference/footnotes.md
- Formatting: reference/formatting.md
- Grids: reference/grids.md
- Icons, Emojis: reference/icons-emojis.md
- Images: reference/images.md
- Lists: reference/lists.md
- MathJax: reference/mathjax.md
- Insiders:
- insiders/index.md
- Getting started:
- Installation: insiders/getting-started.md
- Changelog: insiders/changelog.md
- Blog:
- blog/index.md
- 2022:
- blog/2022/chinese-search-support.md
- 2021:
- blog/2021/the-past-present-and-future.md
- blog/2021/excluding-content-from-search.md
- blog/2021/search-better-faster-smaller.md
System information
- Operating system: Ubuntu 20.04 on WSL on Windows 11
- Browser: Firefox 100
Contribution guidelines
I've found a bug and checked that ...
mkdocsorreadthedocsthemescustom_dir,extra_javascriptandextra_cssDescription
Trying to do some theme development. Set up the dev environment as documented here: https://squidfunk.github.io/mkdocs-material/customization/#theme-development
I run
npm start, and it starts without error.I make a change to a file in the theme, and it spits out an error (see below).
Expected behaviour
File changes do not cause npm to crash.
Actual behaviour
Error output:
Steps to reproduce
npm startPackage versions
Configuration
System information