This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A short script to update the date in the frontmatter of a Hugo post. | |
// The date is updated to the current date and time. | |
// Run this script with `go run scripts/refresh-post-date/main.go -file path/to/post.md`, | |
// and you'll see: | |
// > ❯ go run main.go -file path/to/post.md | |
// > 12:10PM INF Refreshed by diff=1m55s | |
// > 12:10PM INF Successfully updated the date! 🎉 post=path/to/post.md | |
// You can add the `-verbose` flag to see more detailed logs. | |
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Made by Shay Nehmad, feel free to use. For details see | |
https://mrnice.dev/posts/hugo-flashcard-shortcode-for-study/ | |
--> | |
<!-- This "with" is for error handling, see | |
https://gohugo.io/templates/shortcode-templates/#error-handling-in-shortcodes | |
--> | |
{{ with .Get "question" }} | |
<!-- get a random string to add to each ID --> | |
{{ $seed := now.Format ":time_full" }} {{ $random := delimit (shuffle (split |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS IN A PROGRAMMING LANGUAGE CALLED GOLANG | |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Bound 2") | |
} |