Closed 825i closed 1 year ago
Hi!
Thank you so much for using my theme. I am happy to help here.
If you make a page in hexo, in this case, the about
page, the markdown file should be in the directory of source/about/index.md
. In Hexo, the folder represents pages, and the content is in the index.md
under the folder. After generation, you will be able to access the page by typing https://yourwebsite.com/about
If you want to add the page to the navigation bar, in your _config.redefine.yml
, in the NAVIGATION
part, you will add:
# NAVIGATION BAR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start
navbar:
......
links:
......
About: #this is the name to display in the nav bar
path: /about #path to the page, in this case, to the folder's name.
icon: fa-regular fa-link # the icon before the nav bar item
......
# NAVIGATION BAR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
Please write all your date in the post front matter as YYYY-MM-DD HH:MM
. This should solve the problem.
If you have any further questions, feel free to ask me.
Also I'm sorry for I didn't have effort to write English documentation. I will do this in the near future.
Thank you so much for the explanation!
Is there no way at all to change the date format to MM-DD-YYYY
?
DMY is the world's most popular format of displaying date: https://en.wikipedia.org/wiki/Date_format_by_country
Currently how I make posts/pages is not using the hexo-cli. As I am running Hexo in a docker container.
So basically I just use VSCode editor to make a .md
file in the appropriate directory eg. /root/sources/_posts/mypost.md
My page scaffold shows:
title: {{ title }}
date: {{ date }}
Is there no way to set the date any differently?
It would be great if I could backdate pages (by setting a manual date eg. a few days ago) in order to force the sorting by date. Let's say if I wrote a post on 12th, but didn't publish it until 15th, but still wanted it to show published on 12th.
P.S. No problem with lack of English documentation.
Yes, there is a way, but only for the date display on the home screen, but not on the article page side. This is a bug and I didn't think about it when writing the theme. I will release a patch for this problem in the next version. (I will release it today (Jul 13 EDT). Sorry for the inconvenience. Please proceed with the following steps and change the config file. And after updating to the next version, you should be able to see the date changes on the articles side
First you still need to make in your posts front matter, you write the date in YYYY-MM-DD HH:MM
.
Then go to the root of your blog, open _config.yml
You will find the following and you can change it to the format you want
I will release a patch version to fix this issue and after that, you should be able to see the changes. Thank you for your patience.
PS: Thanks for the donation <3
Creating a page without hexo-cli is also possible. Just like I said, create a folder in your /source
directory with the name of your page e.g. about
. Then create an index.md
under the about
folder. That way after generation, you will be able to access it with relative path /about
About the date, you can change it to any date you want, and the theme will show it as it was created on the date you set. For example, I can do something like this:
Alright I changed it back in the root/_config.yml
, but I set it in your theme as:
# Article Date Format
article_date_format: DD-MM-YYYY
it's looking quite good now: https://blog.xtu.icu/1991/04/04/template/
I changed in this test case, the date to 1991-04-04
and it is displayed correctly still on my page.
I've forked your theme and made my own changes to some parts. Do you think this is a bad idea as far as getting updates for your theme? As I am not using npm, and git is pointing to my branch and not yours. I wouldn't want to overwrite my own changes.
P.S. Don't mention it about the donation, good work should be rewarded. The work you have done, even with adding comments is amazing. I have disabled them for now, but later will need to figure out how to change the comment box (eg. name, email, website boxes) into English. For now it is not important. If, in the future it would be possible to turn on comments on only some posts/pages I would be more than happy to pay for that feature too. Rather than enable it for all posts/pages.
EDIT: I just noticed on the bottom of a post, in this info block, the date is wrong: 911991
and 232023
https://blog.xtu.icu/1991/04/04/template/
Yet in my editor it was written like this for my page:
Your _config.yml has: YYYY-MM-DD
and the root _config.yml has DD-MM-YYYY
I see. If you have already made changes of your own, don't update it from my side as it will overwrite your code. Instead, after I published a release, you can look at the changed files and manually sync it to your side as the new releases contain new functions and bug fixed
Btw I have currently fixed the date issue. I will reference this issue in the commit and you can change the file accordingly on your side :)
Thank you so much!
I didn't mean to close, as there's still the 232023 and 911991 issue. I'll wait until updating to see if it's fixed and then close if it is.
Yeah i fixed that too. You can check the commit. It should work correctly as on my end:
Brilliant!
Feel free to open other issues if you have other questions as I didn't finish the English documentation 😂
It is also possible to turn on/off comments for specific posts.
By default, comments are enabled for all posts and disabled for all pages. If you want to disable it on posts, just add comment: false
to the front matter. If you want to enable it on pages, just add comment: true
to the front matter
Great news! I finished the English documentation. The document is located at redefine-docs.ohevan.com
Sorry for asking here but I have tried everything to find a way to do these two things.
Firstly, thank you so much for this incredible theme! I absolutely love it and it will be perfect for what I am trying to do.
I have my blog here: placeholder
First question:
What I would like is at the top, where "About" link is, to link to a specific page on my blog. That is, a page which is separate from the way posts are displayed. Similar to in Wordpress when you make a page, it is treated independently to a post. Please excuse me if my question is confusing.
I have my installation directory as below:
According to the Docs: https://hexo.io/docs/writing I should be able to put new pages in
root/source
but then my question is, how do I link them? i.e. how do I make the "About" link at the top, point to theroot/source/about.md
?Second question:
All of my posts have the wrong date. I have changed the format from YYYY-MM-DD to, DD-MM-YYYY, but the date is still starting from 1970?
01-01-1970 03:00 Created 13-07-2023 00:35:27
See here: https://blog.xtu.icu/1970/01/01/template/How do I change it to reflect the current date and time? I have looked all through the theme and cannot find out how to do this.
Thank you so much for any help!