ardumont / org2jekyll

Blogging with org-mode and jekyll without alien yaml headers.
GNU General Public License v2.0
71 stars 19 forks source link

How to change layout value in yaml header ? #53

Closed louiszgm closed 4 years ago

louiszgm commented 6 years ago

When i use M-x org2jekyll-publish-posts, it generated the yaml header like this:

---
date: 2018-03-07
tags: 
- CC
author: louiszgm
layout: post
title: CC
excerpt: CC
categories: 
- CC
--- 

I want the layout value to be single, the expected yaml header i want like this:

date: 2018-03-07
tags: 
- CC
author: louiszgm
layout: single
title: CC
excerpt: CC
categories: 
- CC
--- 

Shoud i hook the plugin?

ardumont commented 6 years ago

I know the doc says not to do it (don't remember why though) but have you tried to:

#+LAYOUT: single

Note: I assume that the your org2jekyll/org-publish configuration in the org-publish-project-alist custom has an entry 'single' somewhere.

Shoud i hook the plugin?

I just don't know yet ;) Cheers,

louiszgm commented 6 years ago

I have tried both way that you suggest, but it can't work. @ardumont

ardumont commented 4 years ago

The layouts seem to be hard-coded in some places, [1] for example.

So to allow this layout override, i think the most sensible thing to do is to actually defines one new org2jekyll custom.

That would default to the current hard-coded values.

[1] https://github.com/ardumont/org2jekyll/blob/master/org2jekyll.el#L208