Вот код, иллюстрирующий java.lang.NoClassDefFoundError
. Пожалуйста, см. ответ Джареда для подробного объяснения.
NoClassDefFoundErrorDemo.java
public class NoClassDefFoundErrorDemo {
public static void main(String[] args) {
try {
// The following line would throw ExceptionInInitializerError
SimpleCalculator calculator1 = new SimpleCalculator();
} catch (Throwable t) {
System.out.println(t);
}
// The following line would cause NoClassDefFoundError
SimpleCalculator calculator2 = new SimpleCalculator();
}
}
SimpleCalculator.java
public class SimpleCalculator {
static int undefined = 1 / 0;
}
_config.yml
collections:
news:
output: true
permalink: /news/:title
Вы можете определить slug
в начале:
---
layout: newspost
title: "Fracture announces exclusive 3 year deal with Drake & Morgan."
date: 2019-01-16
slug: "fracture-announces-exclusive-3-year-deal-with-drake-and-morgan"
---
И определить значение по умолчанию permalink
для новостей:
collections:
news:
output: true
permalink: "/:collection/:slug/"
ИЛИ
Вы может немного больше работать с именами файлов и в итоге получить имя файла fracture-announces-exclusive-3-year-deal-with-drake-and-morgan.md . ; -)