-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adding support for multiple files created the same day #7
Comments
Currently there’s no way of doing this. Adding title slugs would not solve another problem, which is ordering posts with the same day. We would probably need to add the hour inside the file name. I’ll look how to fix this. |
Thanks for looking into it! I've been looking for a static site generator for my own semi-professional/personal website & digital garden, and I love how small/simple it is plus your anticapitalist principles. |
@jlcolbert I took a bit of time to think about this. The limit you encountered is that Chisai uses dates as filenames, and you can only create one for each day. Since you need wikilinks (cf #6 ), I suspect you use a zettelkasten system of sorts, and see Chisai as a good way to generate a web version of your notes. So my conclusion is that dates does not matter in your use case, and slugs are more important because your content is not expected to be organized by dates. Am I correct? If I am, here are the changes I suggest we do.
Does that makes sense to you? |
Yes, that makes sense! And yeah, I'm wanting to do a "digital garden," primarily as a way to work through research ideas. |
I'll start working on this soon. Keep in mind that I probably need to refactor some things to make it works so it could take some time before it's done. |
No problem at all! Thanks again for looking into it. |
Ok I actually had time tonight and it was less complicated that I thought. URL optionsYou now have 3 options to name your files:
I strongly discourage mixing the custom date approaches with the no date approach in the same folder! It's probably better to use the date or date + slug in your blog folder, and the no date format in your notes pages. Flat build optionIn the
Wikilink optionI updated the wikilink syntax to take the flat build option into account. When NOT using the flat build:
When USING the flat build:
In your case since you are working towards a digital garden approach, I suggest you se the flat build option to Let me know how it goes or if you find any bugs. |
Works like a charm! Thanks so much. |
Oh, just realized something. When I push commits, the build of the site seems to reset all the dates to the date of the commit. I can open up a new issue if needed! I do have it set to flat build but still use folders in my actual editor. The build removes the folders just fine, but I didn't know if that might have something to do with the dates. |
Hum that's not normal. I'll look it to it asap. |
Ok, after a lot of trials and errors that made me delete the entire commit history, squash dozens of commits for in the end delete everything and be back to square one, I can at least explain what's happening. The reason you have all the dates and I did not have them is because of github-actions, the set of scripts that is building the website each time you make a change. Instead of taking the existing files, the whole repository seems to be cloned, which creates new "last modified" dates for all the files and of course, when the build happends, they're all the same. This problem would not happen in a configuration where the deployment is done on a classic server, after a simple git pull. It doesn't seem there is a way to change this for github actions as everything runs on docker image files or equivalent. I'm going to explore two solutions:
Thanks for your patience. |
To keep you updated:
TLDR: it works until it doesn't, still investigating. Meanwhile you can still use Chisai and dates should be the right ones when I find a solution. |
Awesome, thanks! In the meantime, should I refrain from using GitHub actions and run the build script manually? I noticed running build.py in my local repo built it just fine, it was just the gh actions generating that specific branch that got screwy. |
For Chisai I assume people don't have the know-how of git and launching scripts, so I always try to make things work without the user having to manually build the site. Since you have the knowledge yes, you can build it locally if you want. It should be even better than the previous version since now it takes git commit dates instead of modification dates, which means if you ever cloned the repo to another computer, the dates should still be ok. I'll keep searching how to fix this! |
Sweet! I'll let you know how the manual build goes. I might not be too knowledgeable, but I always try to know just enough to be dangerous, ha. |
Got it to work! Here's what I did:
|
If it's working for you then good, the goal is that everyone can self-appropriate it. I'll keep working on my side. :) |
With the current file naming configuration, only one file could be created per day in each folder. Is there a way to add title slugs after the date in the file name, and have it parse?
The text was updated successfully, but these errors were encountered: