Comments (3)
I define some variables in extra to render the text and dynamic links. After deploying the versioning docs, the text and link are not properly rendered.
But, the
mkdocs serve/build
andmike serve
can render the page properly.
I don't think that's possible. mike serve
simply shows the results of your gh-pages
branch, which is just the contents of mike deploy
(for all the versions you're hosting). So if mike serve
works, then that implies mike deploy
worked too. In addition, when generating your docs, mike deploy
calls mkdocs build
to do all the work, so if the latter works, the former should too.
I tested this locally, and this works fine for me once I installed mkdocs-macros-plugin
, which I see you're using. In fact, I've used that plugin for years with mike (albeit by defining the macros through a Python script) with no issues.
from mike.
I took a look at your GH Actions log and I think something in your Actions configuration is broken. For both the Build mkdocs
[1] and Deploy doc
steps, I'd expect to see some log messages from the mkdocs-macros-plugin
, but I don't. For instance, when running locally, I see these log messages:
INFO - [macros] - Macros arguments: {'module_name': 'main',
'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '',
'on_undefined': 'keep', 'on_error_fail': False, 'verbose': False}
INFO - [macros] - Extra variables (config file): ['foo']
INFO - [macros] - Extra filters (module): ['pretty']
I'm guessing that when you run mkdocs build
locally on your machine, it works. Make sure that whatever versions you have locally are the same as what you have in your GH Actions runner.
[1] You don't actually need to call mkdocs build
in your CI, since you're not doing anything with the results. mike
doesn't care about them, and will internally call mkdocs build
as needed.
from mike.
@jimporter Thanks for sharing how mike serve
works. Yes, I reproduce the same issue only using mkdocs serve/build
.
Finally, I discovered that specifying the configuration below was to blame. I'll report it to mkdocs-material.
plugins:
- search:
lang: en
from mike.
Related Issues (20)
- Use `canonical_version` to defer Google etc. indexing old docs, but how?
- Some config values are not supported despite that they are mentioned in Configuration description. HOT 2
- gh-pages redirect/forward to default version not working HOT 2
- [HELP WANTED] versioning doesn't appear on setup (serve locally) HOT 1
- PyPI release HOT 1
- versioning doesn't appear on setup (serve locally) HOT 1
- Add support for "hidden" versions to the built-in theme extensions HOT 2
- The `latest` folder with redirects deleted by mike 2.0.0 HOT 20
- "Nice to have" FR: a way to do the equivalent of `git show --stat` *if* a commit is created HOT 3
- mkdocs-material deployment with Groups plugin fails with Error: 'GroupPlugin' object has no attribute 'is_serve' HOT 7
- Help/clarification on replacing `--rebase` in `mike v2.0` HOT 7
- Can't mike deploy when using !relative in mkdocs config HOT 11
- Improve usability on non-Github forges HOT 2
- Mike fails to deploy HOT 6
- Is it possible to use mkdocs --no-directory-urls option from mike? HOT 2
- Versioning of sub-folders
- Recommendations on removing versions from a GHA published site
- Deploying docs fails with `error: File is not a zip file` HOT 3
- config load issue after update to 2.1.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mike.