Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default category "Blog" title ? #202

Open
kevinkwl opened this issue Oct 28, 2016 · 10 comments
Open

Change default category "Blog" title ? #202

kevinkwl opened this issue Oct 28, 2016 · 10 comments

Comments

@kevinkwl
Copy link

Can I use another name like "Post" as the title for that category?

@sillykelvin
Copy link
Collaborator

Sorry, "blog" is a default category cannot be removed, the uri cannot be changed, however, you can define a :label in op/category-config-alist to change the name shown on pages. See function op/get-category-name and variable op/category-config-alist for detail.

@nasseralkmim
Copy link

nasseralkmim commented Mar 2, 2017

Kelvinh, I changed the label but the url still shows blog. Is there a way to change this behavior so the url is formed with the label variable?

@sillykelvin
Copy link
Collaborator

Try add the following option in your org file:

#+URI: /the/url/you/wanted/here

@nasseralkmim
Copy link

the url of individual posts are correct. But the url in the navigation bar is using the category name (blog) instead of the label (notes).

I think it is related with the variable: category-uri. Is it getting the name 'blog' or the assigned label?

@sillykelvin
Copy link
Collaborator

Yes, it's rendered by category-uri, only the shown name is controlled by assigned label, the uri is not.

@sillykelvin
Copy link
Collaborator

The newest commit has fixed this problem, happy hacking!

@nasseralkmim
Copy link

nasseralkmim commented Mar 6, 2017

That's great, thank you.
edit: kelvinh, I just tried here. It seem that something broke (not working as expected). I think it is better to revert that commit.
The variable op/category-ignore-list can be used to ignore the blog category? so I can create a new one with similar behavior but different name.

@sillykelvin
Copy link
Collaborator

What is broken? the ignore list cannot ignore the blog category, as it's one of the default categories.

@nasseralkmim
Copy link

It seems that a category with a different label produce a new folder with the label name without a index.html, and since the url is generated by a folder with a index.html you don't get the list of entries in the category.

It's better to keep the way it was, the label only change the name displayed, not the url.

@sillykelvin
Copy link
Collaborator

Yes, you are right, the commit has been reverted. There is another dirty way to achieve this: edit the template nav.mustache, put the things you wanted there directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants