Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] text doubling #2070

Closed
3 of 5 tasks
tadmi opened this issue Jul 15, 2022 · 13 comments
Closed
3 of 5 tasks

[Bug] text doubling #2070

tadmi opened this issue Jul 15, 2022 · 13 comments
Assignees
Labels
needs reproduction Reproduction repo or stackblitz link is required

Comments

@tadmi
Copy link

tadmi commented Jul 15, 2022

Checklist

  • I am using the latest v2 version
  • I have searched FAQ

Package name

vuepress-theme-hope

Which operating system are you using?

  • macOS
  • Windows
  • Linux

Describe the bug

After several page reloads the text in the sidebar and in the title is doubled:

image

Additional context

No response

@tadmi tadmi added the bug Something isn't working label Jul 15, 2022
@tadmi
Copy link
Author

tadmi commented Jul 15, 2022

sidebar

export default sidebar([
	{
		prefix: 'os',
		path: 'os/',
		text: 'ТРЕБОВАНИЯ',
		link: 'os/',
		icon: 'file-shield',
		children: [
			'common',
			'pc',
			'sanitation',
			'fire',
			'electric',
			'move',
			{
				prefix: 'prod/',
				path: 'prod/',
				text: 'Производство работ',
				link: 'prod/',
				icon: 'person-digging',
			},
		],
	},
	{
		prefix: 'actions',
		link: 'actions/',
		path: 'actions/',
		icon: 'angles-right',
		text: 'АЛГОРИТМЫ ДЕЙСТВИЙ',
		children: ['incident', 'first-aid'],
	},
	{
		path: 'signs/',
		link: 'signs/',
		text: 'ЗНАКИ',
		icon: 'ban-smoking',
	},
]);

hopeTheme

export default hopeTheme({
	iconAssets: 'fontawesome',
	navbar,
	home: '/os/',
	sidebar,
	darkmode: 'toggle',
	themeColor: {
		blue: '#2196f3',
		red: '#f26d6d',
		green: '#3eaf7c',
		orange: '#fb9b5f',
	},
	fullscreen: true,
	lastUpdated: false,
	editLink: false,
	contributors: false,
	pageInfo: [],
	plugins: {
		components: ['Badge', 'YouTube'],
		photoSwipe: {},
		mdEnhance: {
			include: {},
			gfm: true,
			attrs: true,
			footnote: true,
			mark: true,
			flowchart: true,
			align: true,
		},
	},
});

config

import { defineUserConfig } from 'vuepress';
import markdownItAttrs from 'markdown-it-attrs';
import abbr from 'markdown-it-abbr';

import { redirectPlugin } from 'vuepress-plugin-redirect';

import theme from './theme';

export default defineUserConfig({
	lang: 'ru-RU',
	title: 'Безопасность труда',
	description: 'материал инструктажа',
	theme,

	extendsMarkdown: (md) => {
		md.use(markdownItAttrs);
		md.use(abbr);
		md.use(require('markdown-it-ins'));
	},
	plugins: [redirectPlugin()],
});

@Mister-Hope
Copy link
Member

What do you mean by "Text in the sidebar and in the title is doubled:"?

image
image

If this is what you mean "doubled", you'd better check your own understanding

@Mister-Hope Mister-Hope added invalid This doesn't seem right and removed bug Something isn't working labels Jul 15, 2022
@github-actions
Copy link

Hello @tadmi. This issue is marked as invalid and closed. Please make sure you are reporting an issue and following the issue template.

@Mister-Hope Mister-Hope removed the invalid This doesn't seem right label Jul 15, 2022
@Mister-Hope
Copy link
Member

Oh I think I get you, a minial reproductin repo is required. Or a video about reproduction actions on official docs.

If you can only reproduce that in your own env, I am doubling this is your own problem.

@Mister-Hope Mister-Hope reopened this Jul 15, 2022
@Mister-Hope Mister-Hope added the needs reproduction Reproduction repo or stackblitz link is required label Jul 15, 2022
@Mister-Hope
Copy link
Member

Also you may check your browser extensions, this is likely causing by a vue internal issue, and is not related to vuepress or my theme,

@tadmi
Copy link
Author

tadmi commented Jul 15, 2022

@Mister-Hope new site deployed on netlify: https://be-safety.netlify.app . After several page updates, the problem appears.

@Mister-Hope
Copy link
Member

image

I strongly double that you have issues in your own code. So I insisit you should provide me a minial reproduction repo.

I am feeling huge preformance impack on this site, also I see some redirects which not seems right.

@Mister-Hope
Copy link
Member

Mister-Hope commented Jul 15, 2022

Provide me a reproduction by slightly modifying https://stackblitz.com/fork/vuepress-theme-hope.

Also try not importing any 3rd party plugins, because I have no RESPONSABLE for them, just configuring theme and it's plugins.

I have no access with your source code.

@Mister-Hope
Copy link
Member

Also I see you importing mutiple plugins such as attrs and your own attrs plugins with markdown, you'd better disable them and only use the theme ones. I only accept issues with theme and plugins. And I won't waste time debuging any conflicts. If you met any, you should dig it yourself, and point me the issues straightly and possiable solutions.

@tadmi
Copy link
Author

tadmi commented Jul 15, 2022

@Mister-Hope, i apologize for distracting attention to nonsense. The problem is observed only on netlify.

@tadmi tadmi closed this as completed Jul 15, 2022
@Mister-Hope
Copy link
Member

No need to apologize, you may check netilfy docs to see if it servers some assets specially.

For example, if you are serving file starting with _, you will get 404 with default settings with gh pages.

@ghost
Copy link

ghost commented Aug 25, 2022

@Mister-Hope it seems to be a bundler issue...locally it works fine (dev server) but the transpiled assets run into duped text in the navbar for me

image

Our Vuepress site is cookie-cutter and has no special Vue components or config. From personal experience it seems to be a race condition of sorts.

@ghost
Copy link

ghost commented Aug 25, 2022

Further investigation points to VueJS core SSR. See vuejs/core#6008 . They recently tried to fix it in 3.2.37, but the bug is still around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction Reproduction repo or stackblitz link is required
Projects
None yet
Development

No branches or pull requests

2 participants