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) {
|
||||
}
|
||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../../_vendors.yml'));
|
||||
const dependencies = yaml.safeLoad(vendorsFile);
|
||||
const dependencies = yaml.load(vendorsFile);
|
||||
|
||||
module.exports = hexo => {
|
||||
const { vendors } = hexo.theme.config;
|
||||
|
||||
@ -38,6 +38,8 @@ p {
|
||||
a {
|
||||
border-bottom: 1px solid $link-decoration-color;
|
||||
color: var(--link-color);
|
||||
// For a:not(:any-link)
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
word-wrap();
|
||||
|
||||
@ -9,14 +9,14 @@ describe('Validate', () => {
|
||||
it('config', () => {
|
||||
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
||||
should.not.throw(() => {
|
||||
yaml.safeLoad(themeConfig);
|
||||
yaml.load(themeConfig);
|
||||
});
|
||||
});
|
||||
|
||||
it('vendors', () => {
|
||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
||||
should.not.throw(() => {
|
||||
yaml.safeLoad(vendorsFile);
|
||||
yaml.load(vendorsFile);
|
||||
});
|
||||
});
|
||||
|
||||
@ -26,7 +26,7 @@ describe('Validate', () => {
|
||||
fs.readdirSync(languagesPath).forEach(lang => {
|
||||
if (!lang.endsWith('.yml')) return;
|
||||
const languagePath = path.join(languagesPath, lang);
|
||||
yaml.safeLoad(fs.readFileSync(languagePath), {
|
||||
yaml.load(fs.readFileSync(languagePath), {
|
||||
filename: path.relative(__dirname, languagePath)
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user