mirror of
https://github.com/welpo/tabi.git
synced 2025-11-23 02:00:25 +01:00
- Add micro section display on homepage with RSS feed - Support configurable section name via micro_section_name - Add toggle via show_micro config option - Create templates/partials/main_page_micro_list.html - Add sass/parts/_micro.scss for styling - Include RSS icon next to section heading Closes #1
29 lines
No EOL
544 B
Bash
Executable file
29 lines
No EOL
544 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Quick micro post generator - eliminates title/date friction
|
|
|
|
set -euo pipefail
|
|
|
|
# Get current timestamp
|
|
NOW=$(date +"%Y-%m-%dT%H:%M:%S%:z")
|
|
FILENAME=$(date +"%Y-%m-%d-%H%M")
|
|
TITLE=$(date +"%Y-%m-%d %H:%M")
|
|
|
|
# Get content from stdin or prompt
|
|
if [ -t 0 ]; then
|
|
echo "Enter micro post content (Ctrl+D when done):"
|
|
CONTENT=$(cat)
|
|
else
|
|
CONTENT=$(cat)
|
|
fi
|
|
|
|
# Create post
|
|
cat > "content/micro/${FILENAME}.md" <<EOF
|
|
+++
|
|
title = "${TITLE}"
|
|
date = ${NOW}
|
|
+++
|
|
|
|
${CONTENT}
|
|
EOF
|
|
|
|
echo "Created: content/micro/${FILENAME}.md" |