codermarcos / dev-dark-theme

The dev dark theme is a theme developed using hexo.
https://codermarcos.github.io/dev-dark-theme/
26 stars 3 forks source link

The theme doesn't work #7

Open iKeepLearn opened 6 years ago

iKeepLearn commented 6 years ago

dev-dark-theme.PNG

codermarcos commented 6 years ago

Thank you for your issue! 😃 👍 @Freelancecn please check this file in your theme clone: themes\dev-dark-theme\scripts\index.js

It should look like this.

hexo.extend.helper.register('url_data', args => {
  let data = [];

  args.data.forEach(element => {
    data.push(element.name.replace(new RegExp(' ', 'g'), '-'));
  });

  return data.join('/');
});
hexo.extend.helper.register('first_data', args => {
  let data = args.data[0] ? args.data[0].name : '';
  return data.replace(new RegExp(' ', 'g'), '-');
});
hexo.extend.helper.register('url_title', args => {
  return args.replace(new RegExp(' ', 'g'), '-');
});

Hope this helps...

J-Siu commented 5 years ago

Getting same issue. Already checked the above files and it is exactly the same in git clone.