estruyf / vscode-front-matter

Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
https://frontmatter.codes
MIT License
1.96k stars 78 forks source link

Pelican Front Matter cannot be parsed #146

Closed apowell656 closed 2 years ago

apowell656 commented 2 years ago

Describe the bug A clear and concise description of what the bug is. When selecting a document and trying to access the extension's screen, I am presented with nothing. I have several client sites built with Hugo that don't have the same issue. I use the same front matter format/fields for both types of sites (although one uses TOML and the other YAML).

I have followed the instructions from start to finish with the same results.

Expected behavior A clear and concise description of what you expected to happen.

image

Screenshots If applicable, add screenshots to help explain your problem. image

image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

estruyf commented 2 years ago

Hi, @apowell656 there seems something wrong with the front matter of the file. Would you be able to share both of the files their contents? If not, just a sample to see how it fails.

apowell656 commented 2 years ago

No problem...

The failing file using Pelican

--- 
title: Apple M1 - From Breakup to Makeup
authors: Andre Powell 
twitterhandle: ChrisAndAndre 
date: 2021-03-06 00:00 
modified: 2021-03-06 00:00 
slug: apple-m1-from-breakup-to-makeup
category: Technology 
tags: Apple, M1
status: published
featuredimage: images/featured/apple_mac_mini_m1.jpg
type: article
--- 
Some years ago, I broke up with Apple. There was nothing that made me want to spend the Apple tax any longer. There was nothing in their lineup that made me want to buy a new Mac, and honestly there wasn’t for a while. Spending more time with Linux made me look at [System76](https://system76.com/) for my next daily driver. The price versus performance made more sense going in the direction, and the “workarounds” to get certain things to work with Homebrew was an extra step I couldn’t commit to. Then some things changed. 

## Aging Hardware and iOS Development

My custom desktop build running [Pop!_OS by System76](https://system76.com/pop) (daily driver), a Hackintosh, and my ThinkPad running [Zorin OS](https://zorinos.com/) were _kind of _getting the job done. I had been planning to replace my daily driver and laptop this year and had upgraded the graphics card on the desktop and threw some more memory into the laptop. Two simple upgrades that should have kept me going for another year. Then the problems arose.

I recently started working on a mobile app and in order to make a build for iOS you need a Mac and that is where my Hackintosh fit the bill. After upgrading to Mojave, I started experiencing multiple kernel panics. Then the fan on my desktop failed, and my laptop stopped waking from sleep mode even after disabling this functionality. After a few days and nights of watching me work through the repairs, my wife decided replacing them would make the world a better place. _Insert angelic singing here._

## My Setup and Implementation

I ordered the Mac Mini with 16GB of ram and 256GB of storage and later a MacBook Air with the same configuration. Since you cannot upgrade the memory maxing out the memory was the way to go and there are cheaper options to upgrading the storage. The overall experience is amazing and the speed of everything is faster and noticeable.

### Eh, 256gb Is Not That Bad - I Haven’t Used A Of Lot Local Storage In Years

A rule of thumb with hardware for me is to buy as much memory as you can and remember adding storage space is cheap. With that I maxed out the memory because I am sure that I will get to a point (eventually) where I may stress out the system. My system for file storage is a little different, but I will share with you how I can make 256GB not even a second thought.

I purchased an external [USB](https://www.amazon.com/gp/product/B08QHN3229/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) hub and a [Samsung SSD 1TB drive](https://www.amazon.com/gp/product/B089C73T72/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) to add additional ports and provide more storage for the Mini. When possible, I install applications on the SSD and everything else on the internal drive. Problem solved, but there is more.

Nextcloud, Google Docs, Google Drive, Microsoft, and OneDrive equal the storage _secret sauce_. Taking advantage of cloud storage when possible makes life simple and increases productivity. 

My Nextcloud instance replaces Dropbox for things I am working on that I may need to access anywhere. Archived files, projects, notebooks, tiny scripts, etc. all live on this drive and are available on any device I may use at the moment. Attached to my server is an 80GB usb hard drive (salvaged from an old laptop and placed in an enclosure) that I share via Nextcloud, which I have yet to fill to 20%. If I ever need to expand the storage, I just add a drive.

Next in the setup is Google’s office suite and Office365, which are used the same way depending on what I am working on. For example, I write a majority of my documents in Google Docs out of habit and use Office365 when collaborating with my wife and a few other colleagues. Both solutions mean I don’t need to store the documents locally and have multiple places to access them. Recently, I discovered Office saves items to OneDrive and as far as I can tell uses no local storage, which is a bonus because I can’t imagine actually filling up 1TB of space with Office documents.

### Getting Work Done - Not Much Has Changed

I spend a lot of time with IDEs (PyCharm and Android Studio) and Visual Studio Code running builds and simulators. If I used [Docker](https://www.docker.com/blog/new-docker-desktop-preview-for-apple-m1-released/) (and until recently [Go](https://www.zdnet.com/article/go-programming-language-just-added-native-support-for-apples-mac-m1-arm-chip/)) and some Adobe products I would probably have issues, but they aren’t my bag, so I haven’t run into the issues that other devs/designers have had. The only thing I have to remember is when I set up Python virtual environments to remember that the cloud servers I use are x86 based, and I need to switch the architecture when creating the environment. 

## Overall

The longest part of setting up each device was getting my dev environments ready to go. So, after about an hour and a half per device, I could get up and running. The experience has been very pleasant and Apple nailed it. 

I have read quite a few articles on Intel’s attempts to catch up and level the playing field, but here is the thing. Apple fixed on my biggest gripes that I was having with them. I could always buy a better performing computer cheaper than their lowest priced computer. With the M1, I could buy two computers for the price of one and not sacrifice performance.

This is not an Apple versus Windows post, nor is it a AMD/Intel versus M1 article. I don’t put a lot of value in benchmarks, because that is not my thing and of course YMWV. What I have found is that Apple has made some devices that IMO are the best on the market **_right now_ **and they have set the bar pretty high.

The one that works. Using Hugo - I also tried to see if I get this file to work properly in Pelican.

---
title: "Dummy_article_1"
date: 2021-06-26T18:05:52-04:00
draft: true
featured: https://source.unsplash.com/random/1400x500
cover: https://source.unsplash.com/random/600x300
tags: [test,another]
category: test
type: blog
---
Ipsum et consequat nisi occaecat non nostrud sit nostrud adipisicing. Ut commodo officia nostrud laboris deserunt aliquip. Aliqua aute adipisicing pariatur cupidatat magna occaecat. Ad esse cillum nostrud enim consequat esse ut. Laboris aliquip adipisicing sit velit magna labore qui irure adipisicing enim.

Cupidatat quis anim excepteur sunt fugiat laborum. Labore officia qui nostrud dolor velit. Minim est aute aliqua sit irure do. Esse cupidatat commodo do aliqua adipisicing consectetur deserunt sunt. Id minim ad eiusmod mollit quis consequat culpa ut. Labore officia ipsum pariatur amet nulla elit aliquip irure. Proident adipisicing Lorem tempor esse nisi laboris et qui veniam minim ut.

Sunt duis magna ipsum culpa ad velit id in ad adipisicing dolore. Ullamco deserunt ea reprehenderit eu elit esse ad exercitation adipisicing commodo mollit ut nostrud reprehenderit. Laboris deserunt irure laboris exercitation mollit fugiat magna fugiat ea nulla reprehenderit adipisicing minim. Irure ad in ipsum enim ex eu sint enim ullamco duis anim labore minim. Proident adipisicing incididunt est velit.

Excepteur deserunt cillum sunt anim eu ea veniam aliqua ea esse id aliqua. Enim voluptate exercitation labore ad consequat exercitation sint aute labore. Ipsum eu deserunt qui Lorem nulla ullamco nulla officia et minim occaecat labore do. Enim mollit et dolore consectetur sunt anim excepteur dolor nisi consectetur qui tempor ea consectetur. Proident dolor non duis cupidatat aute ut ad irure veniam. Cupidatat anim voluptate ipsum sunt ut nisi ullamco sint. Et incididunt cupidatat sit elit et qui pariatur proident aliqua consectetur labore ad culpa incididunt.

Ea consectetur eu voluptate veniam sint eiusmod aliqua incididunt laborum sint nulla mollit ut nostrud. Tempor ut amet quis do nostrud mollit qui minim qui velit consequat deserunt. Esse culpa veniam enim mollit. Laborum sit minim quis fugiat laborum mollit. Deserunt aute consectetur non non consequat dolore.

Nisi ullamco mollit sit magna consectetur consequat nostrud consectetur id fugiat. Cillum fugiat nulla culpa esse dolor in cupidatat consectetur deserunt ex. Et eiusmod officia reprehenderit ut aliquip elit. Duis officia sint velit cupidatat magna labore aliquip proident sint irure magna. Irure ullamco dolore esse magna duis.
estruyf commented 2 years ago

Thanks @apowell656, will start some testing to see where it fails.

apowell656 commented 2 years ago

I appreciate it.

estruyf commented 2 years ago

Ok, already spotted the issue ☺️. It is the date format that Pelican expects as it is not an ISO format like Hugo.

apowell656 commented 2 years ago

Genuis! I can't believe I overlooked that.

estruyf commented 2 years ago

@apowell656 you didn't have to close the issue. As I said, I will investigate it and wrote a date parser with some fallbacks.

In the upcoming beta version that is currently building, the Pelican date format should be supported as well.

apowell656 commented 2 years ago

@estruyf thanks for the help on this one. I am looking forward to using this extension ( I really don't want to use forestry.io).

estruyf commented 2 years ago

Happy to hear you want to use Front Matter. Let me know if you have any recommendations or if you see something fail.

estruyf commented 2 years ago

BETA has just been release, it can take a couple of minutes before it is reflected and installable in VS Code.