-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
2,334 additions
and
2,487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Question & Discussion | ||
url: https://github.com/vuepress/vuepress-next/discussions | ||
url: https://github.com/vuepress/core/discussions | ||
about: Please ask and answer questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { defineClientConfig } from 'vuepress/client' | ||
|
||
export default defineClientConfig({ | ||
// | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- [中文路径](./中文目录名/中文文件名.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
这是一个中文文件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
context('layouts', () => { | ||
it('CustomLayout', () => { | ||
cy.visit('/layouts/custom-layout.html') | ||
cy.get('.e2e-theme-custom-layout').should('exist') | ||
cy.get('.e2e-theme-custom-layout-content') | ||
.contains('Should use CustomLayout') | ||
.should('exist') | ||
}) | ||
it('CustomLayout', () => { | ||
cy.visit('/layouts/custom-layout.html') | ||
cy.get('.e2e-theme-custom-layout').should('exist') | ||
cy.get('.e2e-theme-custom-layout-content') | ||
.contains('Should use CustomLayout') | ||
.should('exist') | ||
}) | ||
|
||
it('Layout', () => { | ||
cy.visit('/layouts/layout.html') | ||
cy.get('.e2e-theme').should('exist') | ||
cy.get('.e2e-theme-content').contains('Should use Layout').should('exist') | ||
}) | ||
it('Layout', () => { | ||
cy.visit('/layouts/layout.html') | ||
cy.get('.e2e-theme').should('exist') | ||
cy.get('.e2e-theme-content').contains('Should use Layout').should('exist') | ||
}) | ||
|
||
it('NotFound', () => { | ||
cy.visit('/404.html') | ||
cy.get('.e2e-theme-not-found').should('have.text', '404 Not Found') | ||
}) | ||
it('NotFound', () => { | ||
cy.visit('/404.html') | ||
cy.get('.e2e-theme-not-found').should('have.text', '404 Not Found') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
describe('markdown > anchors', () => { | ||
it('should render anchors and navigate correctly', () => { | ||
cy.visit('/markdown/anchors.html') | ||
it('should render anchors and navigate correctly', () => { | ||
cy.visit('/markdown/anchors.html') | ||
|
||
cy.get('.e2e-theme-content h1') | ||
.should('have.attr', 'id', 'title') | ||
.should('have.attr', 'tabindex', '-1') | ||
cy.get('.e2e-theme-content h1') | ||
.should('have.attr', 'id', 'title') | ||
.should('have.attr', 'tabindex', '-1') | ||
|
||
cy.get('.e2e-theme-content h1 > a') | ||
.should('have.attr', 'class', 'header-anchor') | ||
.should('have.attr', 'href', '#title') | ||
.click() | ||
cy.get('.e2e-theme-content h1 > a') | ||
.should('have.attr', 'class', 'header-anchor') | ||
.should('have.attr', 'href', '#title') | ||
.click() | ||
|
||
cy.location().should((location) => { | ||
expect(location.hash).to.eq('#title') | ||
}) | ||
cy.location().should((location) => { | ||
expect(location.hash).to.eq('#title') | ||
}) | ||
|
||
cy.get('#anchor-1-1 > a') | ||
.should('have.attr', 'class', 'header-anchor') | ||
.click() | ||
cy.get('#anchor-1-1 > a') | ||
.should('have.attr', 'class', 'header-anchor') | ||
.click() | ||
|
||
cy.location().should((location) => { | ||
expect(location.hash).to.eq('#anchor-1-1') | ||
}) | ||
cy.location().should((location) => { | ||
expect(location.hash).to.eq('#anchor-1-1') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
describe('markdown > images', () => { | ||
it('should render images correctly', () => { | ||
cy.visit('/markdown/images/images.html') | ||
it('should render images correctly', () => { | ||
cy.visit('/markdown/images/images.html') | ||
|
||
cy.get('.e2e-theme-content img') | ||
.should('have.length', 2) | ||
.each<HTMLImageElement>(([el]) => { | ||
cy.request({ url: el.src, failOnStatusCode: false }).then((res) => { | ||
expect(res.status).to.equal(200) | ||
expect(el.naturalWidth).to.be.greaterThan(0) | ||
}) | ||
cy.get('.e2e-theme-content img') | ||
.should('have.length', 2) | ||
.each<HTMLImageElement>(([el]) => { | ||
cy.request({ url: el.src, failOnStatusCode: false }).then((res) => { | ||
expect(res.status).to.equal(200) | ||
expect(el.naturalWidth).to.be.greaterThan(0) | ||
}) | ||
}) | ||
|
||
cy.get('.e2e-theme-content img') | ||
.first() | ||
.should('have.attr', 'alt', 'logo-public') | ||
cy.get('.e2e-theme-content img') | ||
.first() | ||
.should('have.attr', 'alt', 'logo-public') | ||
|
||
cy.get('.e2e-theme-content img') | ||
.last() | ||
.should('have.attr', 'alt', 'logo-relative') | ||
}) | ||
cy.get('.e2e-theme-content img') | ||
.last() | ||
.should('have.attr', 'alt', 'logo-relative') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
const E2E_BASE = Cypress.env('E2E_BASE') | ||
it('should render links and navigate between pages correctly', () => { | ||
const E2E_BASE = Cypress.env('E2E_BASE') | ||
|
||
describe('markdown > links', () => { | ||
it('should render links and navigate between pages correctly', () => { | ||
cy.visit('/markdown/links/foo.html') | ||
cy.visit('/markdown/links/foo.html') | ||
|
||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.first() | ||
.should('have.text', 'bar') | ||
.click() | ||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.first() | ||
.should('have.text', 'bar') | ||
.click() | ||
|
||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/bar.html`) | ||
}) | ||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/bar.html`) | ||
}) | ||
|
||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.last() | ||
.should('have.text', 'baz') | ||
.click() | ||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.last() | ||
.should('have.text', 'baz') | ||
.click() | ||
|
||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/baz.html`) | ||
}) | ||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/baz.html`) | ||
}) | ||
|
||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.first() | ||
.should('have.text', 'foo') | ||
.click() | ||
cy.get('.e2e-theme-content ul li a') | ||
.should('have.length', 2) | ||
.first() | ||
.should('have.text', 'foo') | ||
.click() | ||
|
||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/foo.html`) | ||
}) | ||
cy.location().should((location) => { | ||
expect(location.pathname).to.eq(`${E2E_BASE}markdown/links/foo.html`) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
describe('pageData', () => { | ||
describe('title', () => { | ||
it('should use title from frontmatter', () => { | ||
cy.visit('/page-data/title-from-frontmatter.html') | ||
cy.title().should('include', 'title from frontmatter') | ||
}) | ||
describe('title', () => { | ||
it('should use title from frontmatter', () => { | ||
cy.visit('/page-data/title-from-frontmatter.html') | ||
cy.title().should('include', 'title from frontmatter') | ||
}) | ||
|
||
it('should use title from h1', () => { | ||
cy.visit('/page-data/title-from-h1.html') | ||
cy.title().should('include', 'title from h1') | ||
}) | ||
it('should use title from h1', () => { | ||
cy.visit('/page-data/title-from-h1.html') | ||
cy.title().should('include', 'title from h1') | ||
}) | ||
}) | ||
|
||
describe('frontmatter', () => { | ||
it('should set frontmatter correctly', () => { | ||
cy.visit('/page-data/frontmatter.html') | ||
cy.get('.e2e-theme-content p').should( | ||
'have.text', | ||
JSON.stringify({ | ||
str: 'str', | ||
num: 1, | ||
bool: true, | ||
arr: [1, 2, 3], | ||
obj: { foo: 'bar', baz: 'qux' }, | ||
}), | ||
) | ||
}) | ||
describe('frontmatter', () => { | ||
it('should set frontmatter correctly', () => { | ||
cy.visit('/page-data/frontmatter.html') | ||
cy.get('.e2e-theme-content p').should( | ||
'have.text', | ||
JSON.stringify({ | ||
str: 'str', | ||
num: 1, | ||
bool: true, | ||
arr: [1, 2, 3], | ||
obj: { foo: 'bar', baz: 'qux' }, | ||
}), | ||
) | ||
}) | ||
}) |
Oops, something went wrong.