xuek9900 / vuepress-plugin-right-anchor Goto Github PK
View Code? Open in Web Editor NEWRight-anchor plugin for vuepres
Right-anchor plugin for vuepres
"vuepress": "^2.0.0-beta.67", "vuepress-plugin-right-anchor": "^2.1.0-rc.2"
index.scss 也配置了,config.js 也配了:
['vuepress-plugin-right-anchor', { showDepth: 1, expand: { trigger: 'click', clickModeDefaultOpen: true } }]
llnancy@lilus-MacBook-Pro vuepress-2.x % yarn start
yarn run v1.22.19
$ vuepress dev docs
/Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/vuepress-plugin-right-anchor/lib/node/rightAnchorPlugin.js:4
const utils_1 = require("@vuepress/utils");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/@vuepress/utils/dist/index.js from /Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/vuepress-plugin-right-anchor/lib/node/rightAnchorPlugin.js not supported.
Instead change the require of index.js in /Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/vuepress-plugin-right-anchor/lib/node/rightAnchorPlugin.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/vuepress-plugin-right-anchor/lib/node/rightAnchorPlugin.js:4:17)
at Object.<anonymous> (/Users/llnancy/workspace/llnancy-projects/vuepress-2.x/node_modules/vuepress-plugin-right-anchor/lib/node/index.js:17:29) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.15.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
vuepress's version is ^2.0.0-beta.61
First of all, thank you for such great plugin.
I'd like to see these features to be implemented:
RightAnchor
component to make their own.Sounds good?
The page directory navigation in the upper right corner is folded by default. How to set it to expand by default?
The plugin do not show words wrapped in i.e. <span>
and <strong>
tags. Can you please fix this?
Thank you for your plugin, it's very convenient.
I don't know Vue, but I'm hoping for a little improvement.
The current code only adds the sub
class to level 3 header, with padding-left: 30px;
.
Can you add more indents to h4 and h5 headers?
Will this work with vuepress@next?
As title suggests, showLevel: 2
does not display H2 headers while showLevel: 1
only displays H2 headers. How do I make it display both H2 and H3? This would be perfect for my site.
Thank you :)
In my markdown file, when I use only one # to stdandard the first level title (H1), this plugin doesn't work and don't show the anchor.
The vuepress sidebar has the same problem, and may be this is a bug (or feature) of vuepress.
When I changed all of the first level title to second level title (H2), this plugin and the vuepress sidebar can show the navigation.
My sidebar config using group look like beside:
sidebar:[
{
title: 'foreword',
path: '/'
},
{
title: 'help',
children: [
['/help/man', 'man'],
['/help/info', 'info'],
['/help/whatis', 'whatis']
]
}
]
老哥,这会五一正好有空,可否更新一下,用不了了。。。
My package.json
:
// before:
"vuepress-plugin-right-anchor": "^0.4.9",
// after:
"vuepress-plugin-right-anchor": "^0.5.4",
will emit this error :
wait Rendering static HTML...
[Vue warn]: Error in created hook: "TypeError: Cannot read property 'isIgnore' of undefined"
found in
---> <RightAnchor>
<Root>
error Error rendering /404.html: false
undefined
TypeError: Cannot read property 'isIgnore' of undefined
at VueComponent.filterDataByLevel (node_modules/vuepress-plugin-right-anchor/RightAnchor.vue:103:14)
"vuepress": "^2.0.0-beta.49"
"vuepress-plugin-right-anchor": "^0.5.5"
按照教程安装, 没有显示右测边栏, 是不兼容新版,还是我安装的问题呢, 感谢.
Hi,
In my config, I have set evergreen to true which I guess disables babel, so the JSX isn't transpiled
vuepress config
module.exports = {
//...
evergreen: true,
}
The error in the console browser is
Uncaught Error: Module parse failed: Unexpected token (12:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| render() {
> return <RightAnchor global={true}/>
| }
| })
How to make it work with evergreen set to true?
Thank you
点击返回顶部按钮后,锚点无法恢复到初始化状态
希望支持vite
Hi,
VuePress v2, a.k.a vuepress@next, should be in stable state soon (see vuepress/core#68 ) and my company is considering migrating to it. As we currently use this plugin, I would like to know whether there are any plans to port it to to vuepress@next?
Thank you.
Best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.