mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Use yaml.load
This commit is contained in:
parent
8dd993d2aa
commit
278e160f4d
@ -10,7 +10,7 @@ try {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../../_vendors.yml'));
|
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../../_vendors.yml'));
|
||||||
const dependencies = yaml.safeLoad(vendorsFile);
|
const dependencies = yaml.load(vendorsFile);
|
||||||
|
|
||||||
module.exports = hexo => {
|
module.exports = hexo => {
|
||||||
const { vendors } = hexo.theme.config;
|
const { vendors } = hexo.theme.config;
|
||||||
|
|||||||
@ -38,6 +38,8 @@ p {
|
|||||||
a {
|
a {
|
||||||
border-bottom: 1px solid $link-decoration-color;
|
border-bottom: 1px solid $link-decoration-color;
|
||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
|
// For a:not(:any-link)
|
||||||
|
cursor: pointer;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
word-wrap();
|
word-wrap();
|
||||||
|
|||||||
@ -9,14 +9,14 @@ describe('Validate', () => {
|
|||||||
it('config', () => {
|
it('config', () => {
|
||||||
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
||||||
should.not.throw(() => {
|
should.not.throw(() => {
|
||||||
yaml.safeLoad(themeConfig);
|
yaml.load(themeConfig);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('vendors', () => {
|
it('vendors', () => {
|
||||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
||||||
should.not.throw(() => {
|
should.not.throw(() => {
|
||||||
yaml.safeLoad(vendorsFile);
|
yaml.load(vendorsFile);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ describe('Validate', () => {
|
|||||||
fs.readdirSync(languagesPath).forEach(lang => {
|
fs.readdirSync(languagesPath).forEach(lang => {
|
||||||
if (!lang.endsWith('.yml')) return;
|
if (!lang.endsWith('.yml')) return;
|
||||||
const languagePath = path.join(languagesPath, lang);
|
const languagePath = path.join(languagesPath, lang);
|
||||||
yaml.safeLoad(fs.readFileSync(languagePath), {
|
yaml.load(fs.readFileSync(languagePath), {
|
||||||
filename: path.relative(__dirname, languagePath)
|
filename: path.relative(__dirname, languagePath)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user