我一直在尝试将我的jekyll网站的根目录更改为另一个文件夹,但我似乎无法找到一种方法来做到这一点并且想知道它是否可能? 我想要的是我的所有html页面都在一个名为_pages的文件夹中,并且我的网站从这个文件夹中加载index.html。目前,我只能通过更改baseurl并访问www.domain.com/pages/index.hmtl访问网站来实现这一目标。我可以拥有它,以便html文件保留在此文件夹中,并让jekyll渲染网站,以便我可以从www.domain.com/访问index.html吗?
谢谢
答案 0 :(得分:3)
在您的func pastematchstyle () {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: true); // opt-shft-cmd-v down
event1?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskShift, CGEventFlags.maskAlternate]
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: false); // opt-shf-cmd-v up
// event2?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskShift, CGEventFlags.maskAlternate]
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
func paste () {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: true); // cmd-v down
event1?.flags = CGEventFlags.maskCommand;
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: false) // cmd-v up
// event2?.flags = CGEventFlags.maskCommand
event2?.post(tap: CGEventTapLocation.cghidEventTap)
}
func pasteresults () {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: true); // shft-cmd-v down
event1?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskShift]
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x09, keyDown: false); // shf-cmd-v up
// event2?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskShift];
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
func cut() {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x07, keyDown: true); // cmd-x down
event1?.flags = CGEventFlags.maskCommand;
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x07, keyDown: false); // cmd-x up
// event2?.flags = CGEventFlags.maskCommand;
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
func copy() {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: true); // cmd-c down
event1?.flags = CGEventFlags.maskCommand;
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: false); // cmd-c up
// event2?.flags = CGEventFlags.maskCommand;
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
func copystyle() {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: true); // opt-cmd-c down
event1?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskAlternate];
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: false); // opt-cmd-c up
// event2?.flags = CGEventFlags.maskCommand;
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
func pastestyle() {
let event1 = CGEvent(keyboardEventSource: nil, virtualKey: 0x07, keyDown: true); // opt-cmd-v down
event1?.flags = [CGEventFlags.maskCommand, CGEventFlags.maskAlternate];
event1?.post(tap: CGEventTapLocation.cghidEventTap);
let event2 = CGEvent(keyboardEventSource: nil, virtualKey: 0x07, keyDown: false); // opt-cmd-v up
// event2?.flags = CGEventFlags.maskCommand;
event2?.post(tap: CGEventTapLocation.cghidEventTap);
}
文件中,您需要包含HTML网页所在的目录,如下所示:
_config.yml
在您的include: [_pages]
文件中包含这样的前缀:
_pages/index.html
再次运行您的Jekyll构建命令。如果我正确理解您的问题,这将输出您的主页,而无需拥有或调整您的baseurl。