feat(layouts): add post disclaimer/declaration feature (#832)

Add a lightweight disclaimer notice at the beginning of articles to
indicate content origin (AI-generated, repost, original, custom).

- Add params.disclaimer config with enable, type, content options
- Support 4 types: ai, repost, original, custom
- Add custom SVG icons for ai/repost/original types
- Add i18n translations for 20 languages
- Add shimmer animation effect with RTL and reduce-motion support
This commit is contained in:
Cell
2026-08-24 17:51:58 +08:00
committed by GitHub
parent 152e7fa5a2
commit 47b7c969f1
28 changed files with 233 additions and 1 deletions
+1
View File
@@ -106,6 +106,7 @@ Hugo Pipes processes all assets. The key orchestration is in `_partials/base/ass
- CSS classes: BEM or semantic naming (`header-desktop`, `menu-item`)
- SCSS variables: hyphen-separated, semantic (`$global-font-family`)
- CSS custom properties: prefixed with `fi-` / `--fi-`
- Use `fi-var()` function to reference CSS custom properties (auto-adds `--fi-` prefix), never use `var(--fi-...)` directly
- Use CSS variables for theme switching; SCSS variables for colors (no hardcoded values)
- Prefer relative units (rem, em, %) over absolute units
- Keep selector nesting shallow
+1
View File
@@ -0,0 +1 @@
<svg height="200" viewBox="0 0 1024 1024" width="200" xmlns="http://www.w3.org/2000/svg"><path d="m165.092285 116.164732c-25.344127 4.565483-52.891625 20.150029-71.782258 40.613251-7.39749 8.184825-12.434949 15.741121-18.575209 28.491493-14.638385 29.753014-13.537836 3.462746-13.065796 326.63738l.471998 284.136138 3.621509 11.804231c14.797126 47.856269 52.734987 81.226502 100.432514 88.15414 15.269124 2.203371 164.184377 2.046753 172.841242-.158763 17.472495-4.406741 29.278872-24.556749 24.715513-41.872626-2.205516-8.341486-10.390385-19.04725-17.47464-23.297374-5.352882-2.990749-8.500248-3.147366-88.939372-3.934744l-83.429872-.787378-10.547002-5.194119c-11.962994-5.82488-20.150051-14.325128-25.974888-26.603503l-3.775981-8.184868-.158784-275.949125c-.156596-151.747239.31538-278.467876 1.102779-281.46077 4.565505-20.93524 23.138612-38.407734 45.178756-42.50122 4.87876-.944016 108.302002-1.574777 267.605493-1.574777 259.105246 0 259.577244 0 269.33897 3.306129 11.963037 4.093485 22.351276 11.490997 29.120108 20.937386 11.019043 15.269123 10.390428 7.869488 11.334423 140.412859l.787378 119.636382 4.247978 6.453495c12.909136 19.521393 37.15265 23.456094 53.522386 8.659075 12.909136-11.649867 12.278375-3.304048 12.278375-137.737555 0-131.129524 0-131.601522-9.759624-154.898896-16.056501-38.881834-55.410376-69.104787-98.855613-76.030279-6.768875-.943953-101.533127-1.574713-276.264505-1.41595-218.335377.156617-268.236254.471997-277.995878 2.359988z"/><path d="m250.725528 303.805245c-13.694367 5.663972-22.353378 18.257727-22.509996 32.739472 0 11.021145 6.453495 23.29952 15.584504 29.753014l6.768875 4.722122h317.034309l6.612386-4.406741c10.231557-6.768875 15.110296-15.269124 15.741057-27.862879.471998-8.343631 0-11.806377-2.675368-16.841733-4.09355-8.030396-14.009748-16.687262-22.037999-19.049396-4.408887-1.415993-46.753511-1.88799-156.943504-1.731373-138.527014 0-151.434004.31538-157.574264 2.675369z"/><path d="m246.947402 467.515521c-23.769372 12.437095-25.028747 47.066703-2.359988 60.919791l7.71287 4.7221 104.680493.472126 104.526021.31538 8.341486-3.776002c23.140756-10.54919 27.706218-42.188135 8.500248-58.244551-10.705765-9.130944-7.08417-8.817774-119.479764-8.817774h-103.577735z"/><path d="m634.191337 520.565867c-10.705743 3.46281-22.040058 11.649759-27.547412 19.832482-2.677428 3.936932-9.289772 17.79002-14.640509 30.69701-5.509499 12.909135-20.778623 48.956881-34.003138 80.123743-13.22237 31.169093-29.435489 69.420039-35.88907 85.004628-33.844289 81.069884-45.178583 107.830005-49.113413 116.489016-8.028251 17.944492-6.927638 32.739472 3.462703 44.704612 7.240916 8.500248 16.056545 12.593755 26.916781 12.750372 10.390384 0 18.262018-3.303983 25.816125-10.547001 5.82488-5.666117 10.075004-14.797126 30.225012-63.438628l5.350737-13.378987 83.273255-.471998 83.114492-.31538 12.437138 30.222867c15.584503 38.0945 20.150008 46.753511 26.76012 51.319015 24.715512 16.841734 58.08789-.158763 58.08789-29.594251 0-7.712871-3.306129-16.528499-30.381629-81.069885-16.687262-39.825873-36.206509-86.577238-43.445237-103.893115-17.173505-41.437466-34.437226-82.837515-51.791013-124.19974-7.556253-17.79002-10.705764-23.29952-16.843879-29.596397-13.53775-13.853131-35.103751-19.991246-51.790927-14.638363zm27.388821 131.755993c6.453495 15.897739 18.259937 44.389232 26.131505 63.28201 7.871634 19.04725 14.166366 34.788371 13.853217 35.101606-.315402.31538-24.715598.31538-53.99447.158763l-53.520305-.471998 18.575317-43.290765c10.072794-23.769371 22.194616-52.262946 26.76012-63.279864 4.565505-11.018999 8.815629-20.150008 9.287626-20.150008.471912 0 6.296921 12.909178 12.90699 28.650256z"/><path d="m915.806665 519.937252c-7.712871 2.201225-18.418635 11.647614-21.881382 19.360549-2.831985 6.13805-2.990748 14.638363-2.990748 174.887931 0 159.621017.158763 168.74988 2.990748 174.731378 3.462747 7.871633 13.537751 17.159259 21.409384 19.67801 15.112506 5.035357 33.687758-2.205516 42.501241-16.371881l4.724267-7.712871v-169.380641c0-162.29424-.158762-169.535113-2.992894-174.887995-8.813483-16.685203-26.916737-25.028748-43.760616-20.306626z"/></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1 @@
<svg height="200" viewBox="0 0 1024 1024" width="200" xmlns="http://www.w3.org/2000/svg"><path d="m148.657996 137.18126c-21.954134 5.753981-36.643845 13.627683-51.784116 27.708051-16.504717 15.597267-26.498097 32.556836-32.252122 54.965778-3.029315 11.810553-3.181662 15.747404-3.181662 289.818747 0 273.916872.152347 278.003903 3.181662 289.816601 10.448189 40.730854 38.45883 69.803481 80.25169 82.978523l11.355724 3.482021h261.956139l6.208854-3.331842c21.349104-11.508048 26.498183-36.493644 11.053219-54.056076-11.508049-13.022717-2.272046-12.265383-144.453471-12.567887l-125.678897-.45483-9.843178-4.844365c-10.900894-5.603844-19.531931-15.29472-22.561268-25.742929-1.514669-4.694186-1.817173-69.803481-1.664827-276.49138.150158-267.557839.150158-270.434851 3.179474-277.248714 4.089198-9.238191 12.567909-17.869227 21.803955-22.258763l7.573386-3.634346h260.439282c249.995406 0 260.746121.150179 266.650325 2.874867 14.38506 6.513504 22.561267 17.716902 25.135775 34.828795 3.331927 21.196779 13.930231 32.704827 32.101855 34.522001 21.804041 2.274148 40.730962-18.622271 38.156454-42.093198-5.449374-47.999547-39.218331-86.160185-87.065553-98.423422-10.903039-2.724687-20.746154-2.87491-275.583865-2.724687-251.96276 0-264.831006.150179-274.978835 2.874866z"/><path d="m237.99553 314.493985c-12.567887 3.632201-21.954112 17.564578-21.954112 32.402323 0 16.202234 9.386225 28.770121 24.831124 33.311981 11.508049 3.484167 291.938425 3.331842 303.598756-.150179 14.382958-4.239356 24.376338-17.716903 24.376338-33.009477-.15018-13.627727-7.266547-24.833271-19.986824-31.344629-5.449396-2.724687-11.20548-2.874867-155.961456-2.724687-82.676017 0-152.329318.757334-154.903826 1.512523z"/><path d="m787.496268 359.011511c-20.289265 4.389535-39.518755 15.14025-55.115829 30.887654-7.721463 7.723458-19.986846 24.076022-37.853992 50.12137-48.301988 70.71314-72.832754 106.294979-104.932507 152.932183-55.115979 79.799048-68.443347 100.240595-70.865486 108.266622-3.331885 11.658228-2.424328 34.369675 3.784483 87.065553 9.238191 79.494356 9.388371 80.55634 18.626562 90.094891 7.116368 7.268693 16.047763 11.355723 25.133629 11.355723 4.089177 0 39.823341-7.116368 79.496502-15.897584 80.25169-17.869227 87.368143-20.139085 101.148109-33.768957 4.089176-4.08703 14.232735-16.957422 22.561267-28.770121 8.328532-11.808408 28.012787-39.368511 43.610012-61.172444 15.747404-21.95407 29.677635-41.488188 31.039979-43.607866 1.362344-2.119614 8.328532-11.962836 15.597225-21.956258 17.714757-24.680946 50.119225-70.25831 52.843912-74.497666 1.212164-1.817173 7.723522-11.053219 14.537385-20.44159 19.229426-26.802768 21.803934-30.889863 26.345794-41.943018 12.720213-31.042124 12.115203-64.201824-1.817173-94.486571-9.841055-21.198924-24.680946-37.248833-56.478259-61.324769-23.621106-17.716902-45.577364-29.375131-62.384608-32.859297-12.567887-2.724688-32.859297-2.724688-45.27486 0zm37.553483 71.013499c8.176207 3.484167 42.095343 27.710282 51.483714 36.948473 15.597225 15.14025 20.744094 34.522001 13.627726 50.724235-2.724687 6.056529-10.750714 18.019342-23.470927 34.979039-1.967352 2.724623-4.08703 1.36228-36.036668-22.108647-18.624417-13.627727-42.550173-31.192304-53.300888-38.913595-10.598389-7.723609-19.53193-14.537472-19.98676-15.142481-.605009-1.212164 19.98676-31.797313 25.43828-37.703663 8.631037-9.538593 29.82996-13.930231 42.245523-8.783361zm-81.766359 123.559197c11.962879 8.783361 33.614487 24.680945 48.151873 35.281523 9.976559 7.27352 19.919951 14.592308 29.82996 21.956215l3.482021 2.574465-15.597224 21.347001c-8.478712 11.660373-36.944183 51.181209-63.139797 87.977358l-47.546863 66.623963-15.292575 3.331842c-8.328531 1.967353-31.344629 7.116368-51.331388 11.658228-19.836581 4.544006-36.341362 8.178352-36.493644 7.873702-.30036-.300359-1.664849-12.113057-3.027192-26.195614-1.362344-14.232735-3.481957-34.069316-4.541861-44.212875l-2.121887-18.626562 10.298137-14.687565c5.601656-8.174062 17.564535-25.43828 26.345751-38.308672 21.351249-31.192304 68.593462-100.08827 75.257145-109.626821 2.874867-4.239356 8.326387-11.962878 11.810468-17.262137 6.056614-8.631058 6.813949-9.388306 9.388392-7.573279 1.512587 1.061985 12.565849 9.088012 24.528684 17.87133z"/><path d="m234.058679 474.542536c-24.680945 12.872537-24.226115 47.849367.90966 61.324854 6.056529 3.331756 6.964042 3.331756 104.479951 3.786586 67.683802.302505 100.540954-.15018 105.082815-1.212164 15.14454-3.784612 25.590604-16.047764 27.105273-31.797227 1.362343-14.082642-9.841055-30.43497-23.771286-34.524232-4.089176-1.362344-34.221641-1.817173-105.84444-1.817173h-99.9338l-8.023882 4.239356z"/></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

@@ -0,0 +1 @@
<svg height="200" viewBox="0 0 1024 1024" width="200" xmlns="http://www.w3.org/2000/svg"><path d="m152.811049 118.849443c-15.812621 4.297514-25.94171 8.595029-37.761527 16.269621-27.475706 17.807973-46.508803 47.276949-51.881211 80.58644-2.30433 13.967458-2.30433 541.697068 0 557.968835 5.67922 41.595562 29.471101 74.136949 66.61896 91.483631 22.410154 10.438047 25.939565 11.049525 85.956724 11.665295 36.379756.461291 56.180935.154479 61.555509-.922582 28.241728-6.292865 34.227782-42.824955 9.360986-57.099225-6.447344-3.683891-6.599677-3.683891-63.241903-4.451994l-56.792413-.768102-10.285714-5.063472c-12.585731-6.140532-22.871444-17.03987-27.321334-29.166455l-3.224702-8.595029-.152291-274.148373v-273.993894l3.529369-9.210799c4.297514-11.512961 15.655997-23.791901 27.323394-29.471121l8.595072-4.297515 263.864805-.46129 264.017224-.306791 9.515379 4.451972c12.894689 5.986053 21.182948 13.967436 27.016626 25.939564l5.063471 10.285714.768103 63.701048c.768103 69.687102.615813 67.84623 10.285714 77.057028 9.976755 9.515465 22.716965 11.204004 35.457175 4.913284 6.292865-3.072411 9.056319-5.835865 12.740209-11.974252l4.451994-7.829071-.461291-67.539418c-.459146-65.850879-.459146-67.84623-3.990703-78.284276-12.740209-38.527441-40.370459-66.310003-79.204669-79.357046l-10.744902-3.531557-270.15767-.306855c-258.797043-.306769-270.616816-.154414-280.900384 2.456685z"/><path d="m236.467754 301.818851c-6.754156 2.763454-13.81727 9.05632-17.192202 15.655997-7.829072 15.351331-1.843018 33.157158 13.967458 41.290896l8.290362 4.299659 154.418722-.306812 154.418723-.46129 5.833613-3.531557c7.520221-4.75666 12.740317-11.817628 15.040334-20.414803 3.686036-13.508312-4.295368-29.164309-17.803681-35.304842-5.833656-2.761308-14.428706-2.915787-159.638819-2.761308-97.162872 0-154.880013.613624-157.33451 1.53406z"/><path d="m696.194511 427.380076c-6.908635 3.224681-13.660603 9.363132-17.344536 16.271767-2.304309 3.990702-2.763454 11.972107-3.377078 54.337831l-.768103 49.733677-21.182863 4.297514c-75.061719 14.735561-137.074229 47.890573-188.496273 100.848908-45.436162 46.663325-77.209447 101.614866-98.08554 169.154284-7.213302 23.794026-7.520114 30.239225-2.147685 41.138562 4.297515 8.442695 11.972107 14.428749 21.642051 16.4241 7.522259 1.53406 20.10799-2.763454 28.705164-9.976756 16.117288-13.355979 60.632928-38.222774 92.251735-51.42213 47.738325-20.110135 110.67333-36.379756 157.643467-40.984083l4.297514-.461291.306898 53.724293c.461291 52.95619.461291 53.878772 3.990552 59.403535 10.59259 17.192203 30.852913 22.871444 46.665535 13.047021 3.06812-1.840872 23.330632-20.721614 45.279452-41.752186 26.169137-25.408973 52.41766-50.735686 78.745567-75.979967 124.179498-118.807069 118.193445-112.207434 118.193445-129.860885-.154479-16.576433.306812-16.117245-70.762017-79.663858-108.67798-97.165018-138.301435-123.720352-149.968918-134.465211-6.140533-5.679241-14.121894-11.819774-17.651392-13.508313-8.290276-3.990702-19.648759-4.143035-27.936975-.306812zm97.778642 144.748779c55.412832 49.581258 79.050234 70.455119 88.415511 78.284276 2.761308 2.302164 4.911138 4.604327 4.911138 5.372516 0 .613581-18.880742 19.341947-41.904519 41.290809-22.871444 22.103341-57.25585 55.106063-76.288925 73.373138-19.033075 18.264972-34.843551 33.155012-35.304842 33.155012s-.768103-15.810476-.768103-34.99803v-35.150363l-4.604326-7.367781c-6.599678-10.744772-17.192246-16.117287-31.775431-16.117287-11.972107 0-54.797062 5.831574-84.883954 11.665294-49.73359 9.669944-96.703727 24.098693-139.528683 42.979435-8.442695 3.838369-15.503663 6.447344-15.812621 6.140532-1.072769-.922582 18.880742-32.541302 29.166455-46.049701 5.063472-6.908635 17.958161-21.028426 28.550686-31.620908 38.988732-38.527484 79.51367-61.398929 133.697108-75.214053 16.117245-4.145181 26.862147-5.986097 57.101371-10.59038 13.660646-1.995351 22.564632-7.981405 27.93483-18.880742 3.840601-7.674593 3.990789-8.903922 3.990789-36.838902 0-15.812707.308957-28.857498.770248-28.857498.459145 0 25.787231 22.255675 56.333268 49.424633z"/><path d="m234.165591 463.453021c-22.719111 10.283568-23.794026 44.820307-1.688539 56.642226 6.292866 3.374932 6.445199 3.374932 110.671186 3.374932h104.380465l7.520114-3.683782c8.442781-4.145332 15.503663-13.660754 17.037724-23.178364 2.14983-12.278919-5.524763-26.094044-17.805827-32.389055-5.679242-2.761308-9.824423-2.915873-110.671186-2.915873-84.270329.154565-105.760047.461377-109.443937 2.149916z"/></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

+63
View File
@@ -0,0 +1,63 @@
@use "core/functions" as *;
@use "core/mixins" as *;
@keyframes disclaimer-shimmer {
0% {
background-position: 100% 0;
}
100% {
background-position: -100% 0;
}
}
@keyframes disclaimer-shimmer-rtl {
0% {
background-position: -100% 0;
}
100% {
background-position: 100% 0;
}
}
.post-disclaimer {
display: flex;
align-items: center;
gap: 0.25em;
padding: 0.25rem 0;
font-size: 0.8em;
color: fi-var(global-font-tertiary-color);
.post-disclaimer__content {
background: linear-gradient(
90deg,
fi-var(global-font-tertiary-color) 0%,
fi-var(global-font-tertiary-color) 40%,
fi-var(global-font-color) 50%,
fi-var(global-font-tertiary-color) 60%,
fi-var(global-font-tertiary-color) 100%
);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: disclaimer-shimmer 3s linear infinite;
@include media('reduce-motion') {
animation: none;
}
[dir="rtl"] & {
animation-name: disclaimer-shimmer-rtl;
}
}
.icon {
flex-shrink: 0;
padding-inline: 0.125em;
color: fi-var(global-font-secondary-color);
}
svg.icon {
width: 1.25em;
height: 1.25em;
}
}
+1
View File
@@ -1,4 +1,5 @@
@use "collections";
@use "disclaimer";
@use "footer";
@use "related";
@use "toc";
+10
View File
@@ -728,6 +728,16 @@ end_level = 6
# Whether to decrease the H1 heading level in content.
decrease_h1 = false
# Post disclaimer/declaration.
[params.disclaimer]
# Whether to enable the disclaimer.
enable = false
# Disclaimer type.
# available values: ["ai", "repost", "original", "custom"]
type = "ai"
# Custom disclaimer content (optional, uses i18n default if empty).
content = ""
# Display a message at the beginning of an article to warn the reader that its content might be expired.
[params.expiration_reminder]
enable = false
+6
View File
@@ -125,6 +125,7 @@ other = "مشاركة على"
# === Single Post ===
[single]
contents = "المحتويات"
disclaimer = "تنبيه: "
pin = "تثبيت في الأعلى"
repost = "إعادة النشر"
publishedOnDate = "نُشر في {{ .Date }}"
@@ -147,6 +148,11 @@ password = "كلمة المرور"
enterBtn = "دخول"
encryptyAgain = "تشفير مرة أخرى"
encryptionWarning = "تم اكتشاف تشفير المحتوى، لكنه لا يزال بنص عادي!"
[single.disclaimerMessage]
ai = "تم إنشاء هذا المقال بواسطة الذكاء الاصطناعي. يرجى التحقق من المعلومات بشكل مستقل."
repost = "هذا المقال هو إعادة نشر. يرجى زيارة المصدر الأصلي لمزيد من المعلومات."
original = "هذا هو المحتوى الأصلي للمؤلف."
encryptionCommand = "قم بتشغيل `npx @hugo-fixit/encrypt` بعد البناء لتشفيره فعلياً."
relatedContent = "محتوى ذي صلة"
+6
View File
@@ -124,6 +124,7 @@ other = "Teilen auf"
# === Single Post ===
[single]
contents = "Inhalt"
disclaimer = "Autorenhinweis: "
pin = "Oben anheften"
repost = "Erneut posten"
publishedOnDate = "veröffentlicht an {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Eintreten"
encryptyAgain = "Erneut verschlüsseln"
encryptionWarning = "Inhaltsverschlüsselung erkannt, aber sie sind noch im Klartext!"
encryptionCommand = "Führen Sie `npx @hugo-fixit/encrypt` nach dem Build aus, um sie tatsächlich zu verschlüsseln."
[single.disclaimerMessage]
ai = "Dieser Artikel wurde von einer KI generiert. Bitte überprüfen Sie die Informationen unabhängig."
repost = "Dieser Artikel ist ein Repost. Bitte besuchen Sie die Originalquelle für weitere Informationen."
original = "Dies ist der Originalinhalt des Autors."
relatedContent = "Ähnliche Inhalte"
[single.includedIn]
+6
View File
@@ -124,6 +124,7 @@ other = "Share on"
# === Single Post ===
[single]
contents = "Contents"
disclaimer = "Disclaimer: "
pin = "Pin to top"
repost = "Repost"
publishedOnDate = "published on {{ .Date }}"
@@ -149,6 +150,11 @@ encryptionWarning = "Content encryption detected, but they are still in plaintex
encryptionCommand = "Run `npx @hugo-fixit/encrypt` after building to actually encrypt them."
relatedContent = "Related Content"
[single.disclaimerMessage]
ai = "This article was generated by AI. Please verify the information independently."
repost = "This article is a repost. Please visit the original source for more information."
original = "This is original content by the author."
[single.includedIn]
categories = "included in {{ .Categories }}"
collections = "included in {{ .Collections }}"
+6
View File
@@ -124,6 +124,7 @@ other = "Compartir en"
# === Single Post ===
[single]
contents = "Contenido"
disclaimer = "Aviso: "
pin = "Fijar en la parte superior"
repost = "Repostear"
publishedOnDate = "publicado el {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Entrar"
encryptyAgain = "Encriptar de nuevo"
encryptionWarning = "¡Se detectó cifrado de contenido, pero aún están en texto plano!"
encryptionCommand = "Ejecute `npx @hugo-fixit/encrypt` después de la compilación para cifrarlos realmente."
[single.disclaimerMessage]
ai = "Este artículo fue generado por IA. Por favor, verifique la información de forma independiente."
repost = "Este artículo es un repost. Por favor, visite la fuente original para más información."
original = "Este es el contenido original del autor."
relatedContent = "Contenido relacionado"
[single.includedIn]
+6
View File
@@ -125,6 +125,7 @@ other = "اشتراک‌گذاری در"
# === Single Post ===
[single]
contents = "فهرست مطالب"
disclaimer = "بیانیه نویسنده: "
pin = "سنجاق کردن به بالا"
repost = "بازنشر"
publishedOnDate = "منتشر شده در {{ .Date }}"
@@ -147,6 +148,11 @@ password = "رمز عبور"
enterBtn = "ورود"
encryptyAgain = "رمزنگاری مجدد"
encryptionWarning = "رمزنگاری محتوا شناسایی شد، اما هنوز به صورت متن ساده هستند!"
[single.disclaimerMessage]
ai = "این مقاله توسط هوش مصنوعی تولید شده است. لطفاً اطلاعات را به طور مستقل تأیید کنید."
repost = "این مقاله یک بازنشر است. لطفاً برای اطلاعات بیشتر به منبع اصلی مراجعه کنید."
original = "این محتوای اصلی نویسنده است."
encryptionCommand = "پس از ساخت، دستور `npx @hugo-fixit/encrypt` را اجرا کنید تا واقعاً رمزنگاری شوند."
relatedContent = "مطالب مرتبط"
+6
View File
@@ -124,6 +124,7 @@ other = "Partager via"
# === Single Post ===
[single]
contents = "Contenus"
disclaimer = "Avertissement : "
pin = "Épingler en haut"
repost = "Reposter"
publishedOnDate = "publié le {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Entrer"
encryptyAgain = "Chiffrer à nouveau"
encryptionWarning = "Chiffrement de contenu détecté, mais ils sont toujours en texte clair !"
encryptionCommand = "Exécutez `npx @hugo-fixit/encrypt` après la compilation pour les chiffrer réellement."
[single.disclaimerMessage]
ai = "Cet article a été généré par une IA. Veuillez vérifier les informations de manière indépendante."
repost = "Cet article est un repost. Veuillez visiter la source originale pour plus d'informations."
original = "Ceci est le contenu original de l'auteur."
relatedContent = "Contenu lié"
[single.includedIn]
+6
View File
@@ -125,6 +125,7 @@ other = " शेयर करें"
# === Single Post ===
[single]
contents = "सामग्री"
disclaimer = "लेखक का बयान: "
pin = "शीर्ष पर पिन करें"
repost = "दोबारा पोस्ट करें"
publishedOnDate = "{{ .Date }} पर प्रकाशित"
@@ -150,6 +151,11 @@ encryptionWarning = "सामग्री एन्क्रिप्शन क
encryptionCommand = "उन्हें वास्तव में एन्क्रिप्ट करने के लिए बिल्ड के बाद `npx @hugo-fixit/encrypt` चलाएं।"
relatedContent = "संबंधित सामग्री"
[single.disclaimerMessage]
ai = "यह लेख AI द्वारा उत्पन्न किया गया था। कृपया जानकारी को स्वतंत्र रूप से सत्यापित करें।"
repost = "यह लेख एक पुनर्प्रकाशन है। कृपया अधिक जानकारी के लिए मूल स्रोत पर जाएं।"
original = "यह लेखक की मूल सामग्री है।"
[single.includedIn]
categories = "{{ .Categories }} में शामिल"
collections = "{{ .Collections }} में शामिल"
+6
View File
@@ -124,6 +124,7 @@ other = "Condividi su"
# === Single Post ===
[single]
contents = "Contenuti"
disclaimer = "Avvertenza: "
pin = "Fissa in alto"
repost = "Ripubblica"
publishedOnDate = "pubblicato su {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Entra"
encryptyAgain = "Crittografa di nuovo"
encryptionWarning = "Rilevata crittografia dei contenuti, ma sono ancora in testo in chiaro!"
encryptionCommand = "Eseguire `npx @hugo-fixit/encrypt` dopo la compilazione per crittograffarli effettivamente."
[single.disclaimerMessage]
ai = "Questo articolo è stato generato da un'IA. Si prega di verificare le informazioni in modo indipendente."
repost = "Questo articolo è un repost. Si prega di visitare la fonte originale per maggiori informazioni."
original = "Questo è il contenuto originale dell'autore."
relatedContent = "Contenuti correlati"
[single.includedIn]
+6
View File
@@ -122,6 +122,7 @@ other = "共有先"
# === Single Post ===
[single]
contents = "目次"
disclaimer = "著者声明:"
pin = "ピン留め"
repost = "再投稿"
publishedOnDate = "公開日 {{ .Date }}"
@@ -147,6 +148,11 @@ encryptionWarning = "コンテンツの暗号化が検出されましたが、
encryptionCommand = "実際に暗号化するには、ビルド後に `npx @hugo-fixit/encrypt` を実行してください。"
relatedContent = "関連コンテンツ"
[single.disclaimerMessage]
ai = "この記事はAIによって生成されました。情報を独自に確認してください。"
repost = "この記事は転載です。詳細は元のソースをご覧ください。"
original = "この記事は作者のオリジナルコンテンツです。"
[single.includedIn]
categories = "カテゴリに収録:{{ .Categories }}"
collections = "コレクションに収録:{{ .Collections }}"
+6
View File
@@ -122,6 +122,7 @@ other = "공유하기"
# === Single Post ===
[single]
contents = "목차"
disclaimer = "작성자 성명: "
pin = "고정"
repost = "재게시"
publishedOnDate = "발행일: {{ .Date }}"
@@ -147,6 +148,11 @@ encryptionWarning = "콘텐츠 암호화가 감지되었지만 여전히 평문
encryptionCommand = "실제로 암호화하려면 빌드 후 `npx @hugo-fixit/encrypt`를 실행하세요."
relatedContent = "관련 콘텐츠"
[single.disclaimerMessage]
ai = "이 글은 AI에 의해 생성되었습니다. 정보를 독립적으로 확인하시기 바랍니다."
repost = "이 글은 전재 콘텐츠입니다. 자세한 내용은 원문을 방문하시기 바랍니다."
original = "이 글은 저자의 오리지널 콘텐츠입니다."
[single.includedIn]
categories = "{{ .Categories }}에 포함"
collections = "{{ .Collections }}에 포함"
+6
View File
@@ -124,6 +124,7 @@ other = "Udostępnij na"
# === Single Post ===
[single]
contents = "Spis treści"
disclaimer = "Ostrzeżenie: "
pin = "Przypnij na górze"
repost = "Prześlij ponownie"
publishedOnDate = "opublikowano {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Wejdź"
encryptyAgain = "Zaszyfruj ponownie"
encryptionWarning = "Wykryto szyfrowanie treści, ale nadal są w postaci zwykłego tekstu!"
encryptionCommand = "Uruchom `npx @hugo-fixit/encrypt` po kompilacji, aby je faktycznie zaszyfrować."
[single.disclaimerMessage]
ai = "Ten artykuł został wygenerowany przez AI. Proszę samodzielnie zweryfikować informacje."
repost = "Ten artykuł jest repostem. Proszę odwiedzić oryginalne źródło, aby uzyskać więcej informacji."
original = "To jest oryginalna treść autora."
relatedContent = "Powiązane treści"
[single.includedIn]
+6
View File
@@ -125,6 +125,7 @@ other = "Compartilhar em"
# === Single Post ===
[single]
contents = "Conteúdos"
disclaimer = "Aviso: "
pin = "Fixar no topo"
repost = "Repostar"
publishedOnDate = "publicado em {{ .Date }}"
@@ -147,6 +148,11 @@ password = "Senha"
enterBtn = "Entrar"
encryptyAgain = "Encripte novamente"
encryptionWarning = "Criptografia de conteúdo detectada, mas ainda estão em texto plano!"
[single.disclaimerMessage]
ai = "Este artigo foi gerado por IA. Por favor, verifique as informações de forma independente."
repost = "Este artigo é um repost. Por favor, visite a fonte original para mais informações."
original = "Este é o conteúdo original do autor."
encryptionCommand = "Execute `npx @hugo-fixit/encrypt` após a compilação para realmente criptografá-los."
relatedContent = "Conteúdo relacionado"
+6
View File
@@ -124,6 +124,7 @@ other = "Distribuie pe"
# === Single Post ===
[single]
contents = "Cuprins"
disclaimer = "Notificare: "
pin = "Fixează în partea de sus"
repost = "Repostează"
publishedOnDate = "publicat la {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Intră"
encryptyAgain = "Criptează din nou"
encryptionWarning = "Criptarea conținutului a fost detectată, dar sunt încă în text clar!"
encryptionCommand = "Rulați `npx @hugo-fixit/encrypt` după compilare pentru a le cripta efectiv."
[single.disclaimerMessage]
ai = "Acest articol a fost generat de AI. Vă rugăm să verificați informațiile în mod independent."
repost = "Acest articol este o repostare. Vă rugăm să vizitați sursa originală pentru mai multe informații."
original = "Acesta este conținutul original al autorului."
relatedContent = "Conținut înrudit"
[single.includedIn]
+6
View File
@@ -124,6 +124,7 @@ other = "Поделиться в"
# === Single Post ===
[single]
contents = "Содержание"
disclaimer = "Заявление автора: "
pin = "Закрепить наверху"
repost = "Перепостить"
publishedOnDate = "Опубликовано {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Войти"
encryptyAgain = "Зашифровать снова"
encryptionWarning = "Обнаружено шифрование контента, но он всё ещё в открытом виде!"
encryptionCommand = "Запустите `npx @hugo-fixit/encrypt` после сборки, чтобы фактически зашифровать их."
[single.disclaimerMessage]
ai = "Эта статья была сгенерирована ИИ. Пожалуйста, проверьте информацию самостоятельно."
repost = "Эта статья является репостом. Пожалуйста, посетите оригинальный источник для получения дополнительной информации."
original = "Это оригинальный контент автора."
relatedContent = "Связанный контент"
[single.includedIn]
+6
View File
@@ -124,6 +124,7 @@ other = "Подели на"
# === Single Post ===
[single]
contents = "Садржаји"
disclaimer = "Obavetenje: "
pin = "Закачи"
repost = "Поново објави"
publishedOnDate = "објављено {{ .Date }}"
@@ -147,6 +148,11 @@ enterBtn = "Унеси"
encryptyAgain = "Поново шифруј"
encryptionWarning = "Детектовано је шифровање садржаја, али су и даље у обичном тексту!"
encryptionCommand = "Покрените `npx @hugo-fixit/encrypt` након изградње да бисте их заиста шифровали."
[single.disclaimerMessage]
ai = "Овај чланак је генерисан од стране вештачке интелигенције. Молимо вас да независно проверите информације."
repost = "Овај чланак је репост. Молимо вас да посетите оригинални извор за више информација."
original = "Ово је оригинални садржај аутора."
relatedContent = "Повезани садржај"
[single.includedIn]
+6
View File
@@ -125,6 +125,7 @@ other = "پر شیئر کریں"
# === Single Post ===
[single]
contents = "مواد"
disclaimer = "Tafheem: "
pin = "اوپر پن کریں"
repost = "دوبارہ شائع کریں"
publishedOnDate = "{{ .Date }} کو شائع ہوا"
@@ -147,6 +148,11 @@ password = "پاس ورڈ"
enterBtn = "داخل ہوں"
encryptyAgain = "دوبارہ انکرپٹ کریں"
encryptionWarning = "مواد کی انکرپشن کا پتہ چلا، لیکن یہ ابھی بھی سادہ متن میں ہے!"
[single.disclaimerMessage]
ai = "یہ مضمون AI کے ذریعے تیار کیا گیا تھا۔ براہ کرم معلومات کو آزادانہ طور پر تصدیق کریں۔"
repost = "یہ مضمون ایک دوبارہ شائع کردہ ہے۔ براہ کرم مزید معلومات کے لیے اصل ذریعہ پر جائیں۔"
original = "یہ مصنف کا اصل مواد ہے۔"
encryptionCommand = "انکرپشن کے لیے بلڈ کے بعد `npx @hugo-fixit/encrypt` چلائیں۔"
relatedContent = "متعلقہ مواد"
+6
View File
@@ -123,6 +123,7 @@ other = "Chia sẻ trên"
# === Single Post ===
[single]
contents = "Nội dung"
disclaimer = "Tuyên bố của tác giả: "
pin = "Ghim ở đầu trang"
repost = "Đăng lại"
publishedOnDate = "đăng ngày {{ .Date }}"
@@ -148,6 +149,11 @@ encryptionWarning = "Phát hiện mã hóa nội dung, nhưng chúng vẫn ở d
encryptionCommand = "Chạy `npx @hugo-fixit/encrypt` sau khi build để thực sự mã hóa chúng."
relatedContent = "Nội dung liên quan"
[single.disclaimerMessage]
ai = "Bài viết này được tạo bởi AI. Vui lòng xác minh thông tin một cách độc lập."
repost = "Bài viết này là nội dung được đăng lại. Vui lòng truy cập nguồn gốc để biết thêm thông tin."
original = "Đây là nội dung gốc của tác giả."
[single.includedIn]
categories = "trong {{ .Categories }}"
collections = "trong {{ .Collections }}"
+6
View File
@@ -122,6 +122,7 @@ other = "分享到"
# === Single Post ===
[single]
contents = "目录"
disclaimer = "作者声明:"
pin = "置顶"
repost = "转载"
publishedOnDate = "发布于 {{ .Date }}"
@@ -147,6 +148,11 @@ encryptionWarning = "检测到内容加密,但仍为明文状态!"
encryptionCommand = "请在构建后执行 `npx @hugo-fixit/encrypt` 以实际加密内容。"
relatedContent = "相关内容"
[single.disclaimerMessage]
ai = "本文由 AI 生成,请注意甄别内容真实性。"
repost = "本文为转载内容,请访问原文了解更多信息。"
original = "本文为作者原创内容。"
[single.includedIn]
categories = "收录于 {{ .Categories }}"
collections = "收录于 {{ .Collections }}"
+6
View File
@@ -122,6 +122,7 @@ other = "分享到"
# === Single Post ===
[single]
contents = "目錄"
disclaimer = "作者聲明:"
pin = "置頂"
repost = "轉貼"
publishedOnDate = "發佈於 {{ .Date }}"
@@ -147,6 +148,11 @@ encryptionWarning = "偵測到內容加密,但仍為明文狀態!"
encryptionCommand = "請在建構後執行 `npx @hugo-fixit/encrypt` 以實際加密內容。"
relatedContent = "相關內容"
[single.disclaimerMessage]
ai = "本文由 AI 生成,請注意甄別內容真實性。"
repost = "本文為轉載內容,請訪問原文了解更多信息。"
original = "本文為作者原創內容。"
[single.includedIn]
categories = "收錄於 {{ .Categories }}"
collections = "收錄於 {{ .Collections }}"
+38
View File
@@ -0,0 +1,38 @@
{{- /*
Post disclaimer/declaration partial.
Displays a lightweight disclaimer notice at the beginning of an article.
Supports multiple types: ai, ai-assisted, ai-translated, repost, original, custom.
The "custom" type requires content to be specified, otherwise it will not be displayed.
*/ -}}
{{- $disclaimer := dict "Page" . "Key" "disclaimer" | partial "function/param.html" | default dict -}}
{{- if $disclaimer.enable -}}
{{- $type := $disclaimer.type | default "ai" -}}
{{- $content := "" -}}
{{- if eq $type "custom" -}}
{{- /* custom type requires content, otherwise skip */ -}}
{{- $content = $disclaimer.content | default "" -}}
{{- else -}}
{{- $content = $disclaimer.content | default (T (printf "single.disclaimerMessage.%s" $type)) -}}
{{- end -}}
{{- if $content -}}
{{- $types := slice "ai" "repost" "original" -}}
{{- $iconSrc := "" -}}
{{- if in $types $type -}}
{{- $iconSrc = printf "images/icons/disclaimer/%v.svg" $type -}}
{{- end -}}
<div class="post-disclaimer" data-type="{{ $type }}">
{{- if $iconSrc -}}
{{- dict "Src" $iconSrc | partial "plugin/icon.html" -}}
{{- else -}}
{{- dict "Class" "icon fa-solid fa-bullhorn" | partial "plugin/icon.html" -}}
{{- end -}}
<span class="post-disclaimer__content">{{ T "single.disclaimer" }}{{ $content | safeHTML }}</span>
</div>
{{- end -}}
{{- end -}}
+3 -1
View File
@@ -52,7 +52,6 @@
{{- partial "single/post-author.html" . -}}
{{- partial "single/post-included-in.html" . -}}
</div>
{{- /* TODO add disclaimer or space between meta and content */ -}}
<div class="post-meta-line">
{{- with .PublishDate | dateFormat (.Site.Params.date_format | default "2006-01-02") -}}
<span title="{{ dict "Date" ("2006-01-02 15:04:05" | $.PublishDate.Format) | T "single.publishedOnDate" }}">
@@ -137,6 +136,9 @@
</div>
</div>
{{- /* Disclaimer */ -}}
{{- partial "single/disclaimer.html" . -}}
{{- /* Featured image */ -}}
{{- $cover := dict "Page" . | partial "function/get-cover.html" -}}
{{- if $cover.Source | or (gt (len $cover.Matches) 0) -}}