Fedora packaging (hopefully)
Some checks failed
Deploy Website / deploy-website (push) Successful in 39s
Publish kewt-git to AUR / publish-aur-git (push) Successful in 21s
Release Standalone Builder / build (release) Successful in 27s
Release Standalone Builder / publish-fedora (release) Failing after 15s
Release Standalone Builder / publish-aur (release) Successful in 22s
Release Standalone Builder / publish-homebrew (release) Successful in 7s
Some checks failed
Deploy Website / deploy-website (push) Successful in 39s
Publish kewt-git to AUR / publish-aur-git (push) Successful in 21s
Release Standalone Builder / build (release) Successful in 27s
Release Standalone Builder / publish-fedora (release) Failing after 15s
Release Standalone Builder / publish-aur (release) Successful in 22s
Release Standalone Builder / publish-homebrew (release) Successful in 7s
This commit is contained in:
@@ -48,8 +48,10 @@ build_dir_entries_list() {
|
||||
elif [ "${entry%.md}" != "$entry" ]; then
|
||||
entry_rel_path="${entry#"$src"/}"
|
||||
load_manifest_entry "$entry_rel_path" || continue
|
||||
if [ "${draft_mode:-false}" != "true" ]; then
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
fi
|
||||
label="${name%.md}"
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
|
||||
post_h="$manifest_title"
|
||||
|
||||
@@ -373,7 +375,9 @@ build_files() {
|
||||
|
||||
if [ "${file%.md}" != "$file" ] && [ "$is_preserved" -eq 0 ]; then
|
||||
load_manifest_entry "$rel_path" || continue
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
if [ "${draft_mode:-false}" != "true" ]; then
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
fi
|
||||
is_home="false"; [ "$file" = "$src/index.md" ] && is_home="true"
|
||||
out_file="$out/${rel_path%.md}.html"
|
||||
if needs_rebuild "$file" "$out_file"; then
|
||||
@@ -476,8 +480,15 @@ build_feed() {
|
||||
post_url="$base_url_feed$manifest_url"
|
||||
pub_date=$(format_rfc2822_utc "$post_date" "$post_time")
|
||||
|
||||
printf ' <item>\n <title>%s</title>\n <link>%s</link>\n <guid>%s</guid>\n <pubDate>%s</pubDate>\n </item>\n' \
|
||||
"$feed_post_title" "$post_url" "$post_url" "$pub_date" >> "$feed_path"
|
||||
if [ "$feed_full_content" = "true" ]; then
|
||||
feed_content_file="$src/$post_rel_path"
|
||||
feed_content_html=$(ENABLE_HEADER_LINKS="false" CUSTOM_ADMONITIONS="" MARKDOWN_SITE_ROOT="$src" MARKDOWN_FALLBACK_FILE="$script_dir/styles/$style.css" sh "$script_dir/markdown.sh" "$feed_content_file" | sed 's/</\</g; s/>/\>/g')
|
||||
printf ' <item>\n <title>%s</title>\n <link>%s</link>\n <guid>%s</guid>\n <pubDate>%s</pubDate>\n <description>%s</description>\n </item>\n' \
|
||||
"$feed_post_title" "$post_url" "$post_url" "$pub_date" "$feed_content_html" >> "$feed_path"
|
||||
else
|
||||
printf ' <item>\n <title>%s</title>\n <link>%s</link>\n <guid>%s</guid>\n <pubDate>%s</pubDate>\n </item>\n' \
|
||||
"$feed_post_title" "$post_url" "$post_url" "$pub_date" >> "$feed_path"
|
||||
fi
|
||||
done
|
||||
|
||||
printf ' </channel>\n</rss>\n' >> "$feed_path"
|
||||
@@ -606,12 +617,24 @@ build_tags() {
|
||||
}
|
||||
|
||||
build_error_page() {
|
||||
[ -n "$error_page" ] && [ ! -f "$out/$error_page" ] || return
|
||||
[ -n "$error_page" ] || return
|
||||
|
||||
temp_404="$KEWT_TMPDIR/404_gen.md"
|
||||
printf '# 404 - Not Found\n\nThe requested page could not be found.\n' > "$temp_404"
|
||||
render_markdown "$temp_404" "false" "/$error_page" > "$out/$error_page"
|
||||
rm -f "$temp_404"
|
||||
error_base="${error_page%.html}"
|
||||
error_md="$src/${error_base}.md"
|
||||
|
||||
if [ -f "$error_md" ]; then
|
||||
if needs_rebuild "$error_md" "$out/$error_page"; then
|
||||
is_home="false"
|
||||
current_url="/$error_page"
|
||||
parse_frontmatter "$error_md"
|
||||
render_markdown "$error_md" "$is_home" "/$error_page" > "$out/$error_page"
|
||||
fi
|
||||
elif [ ! -f "$out/$error_page" ]; then
|
||||
temp_404="$KEWT_TMPDIR/404_gen.md"
|
||||
printf '# 404 - Not Found\n\nThe requested page could not be found.\n' > "$temp_404"
|
||||
render_markdown "$temp_404" "false" "/$error_page" > "$out/$error_page"
|
||||
rm -f "$temp_404"
|
||||
fi
|
||||
}
|
||||
|
||||
build_site() {
|
||||
|
||||
@@ -22,6 +22,8 @@ Options:
|
||||
--post Create a new empty post file in the configured posts_dir with current date and time as name
|
||||
--generate-template [path] Generate a new template file at <path> (default: template.html)
|
||||
--version Show version information.
|
||||
--draft, -d Include draft pages in the build.
|
||||
--dry-run Show what would be built without writing any files.
|
||||
--from <src> Source directory (default: site)
|
||||
--to <out> Output directory (default: out)
|
||||
--watch, -w Watch for file changes and rebuild automatically.
|
||||
|
||||
@@ -34,7 +34,8 @@ tags_dir = "tags"
|
||||
generate_search = false
|
||||
search_in_footer = false
|
||||
search_in_header = false
|
||||
include_cw_pages_in_search = false'
|
||||
include_cw_pages_in_search = false
|
||||
feed_full_content = false'
|
||||
|
||||
DEFAULT_TMPL='<!doctype html>
|
||||
<html lang="{{LANG}}">
|
||||
@@ -129,6 +130,7 @@ _load_conf_line() {
|
||||
search_in_footer) search_in_footer="$_lc_val" ;;
|
||||
search_in_header) search_in_header="$_lc_val" ;;
|
||||
include_cw_pages_in_search) include_cw_pages_in_search="$_lc_val" ;;
|
||||
feed_full_content) feed_full_content="$_lc_val" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -187,8 +187,10 @@ build_markdown_manifest() {
|
||||
eval "find \"$src\" \( $IGNORE_ARGS -o $HIDE_ARGS -o $PRESERVE_ARGS \) -prune -o -name \"*.md\" -print" | sort | while IFS= read -r visible_file; do
|
||||
visible_rel_path="${visible_file#"$src"/}"
|
||||
load_manifest_entry "$visible_rel_path" || continue
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
manifest_dir_hidden_by_draft_index "$manifest_dir_rel" && continue
|
||||
if [ "${draft_mode:-false}" != "true" ]; then
|
||||
[ "$manifest_draft" = "true" ] && continue
|
||||
manifest_dir_hidden_by_draft_index "$manifest_dir_rel" && continue
|
||||
fi
|
||||
printf '%s\n' "$visible_rel_path" >> "$manifest_visible_list"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user