-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpelicanconf_example.py
More file actions
189 lines (161 loc) · 4.62 KB
/
Copy pathpelicanconf_example.py
File metadata and controls
189 lines (161 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# -*- coding: utf-8 -*- #
# Pelican configuration file
# --- Imports ---
from datetime import datetime
import os
import locale
from pelican import signals
# --- Set Locale ---
def set_locale():
try:
locale.setlocale(locale.LC_ALL, "tr_TR.UTF-8")
except locale.Error:
print("Yerel ayar desteklenmiyor. Varsayılan yerel ayarlar kullanılacak.")
set_locale()
# --- Environmental Variables ---
PUBLISH = os.environ.get("PUBLISH")
# --- Basic Settings ---
TIMEZONE = "Europe/Istanbul"
I18N_TEMPLATES_LANG = "en"
DEFAULT_LANG = "en"
OG_LOCALE = "en_US"
LOCALE = "en_US"
DATE_FORMATS = {
"en": "%B %d, %Y",
}
AUTHOR = "yuceltoluyag"
SITENAME = "Babanın Yeni Evi"
DESCRIPTION = "Your site description here"
SITESUBTITLE = "yARRAQ GiBi Hay4T"
KEYWORDS = "your, keywords, here"
SITEURL = "https://yuceltoluyag.github.io" if PUBLISH else "http://localhost:8000"
CANONICAL_URL = SITEURL
DELETE_OUTPUT_DIRECTORY = True
DISABLE_URL_HASH = True
BROWSER_COLOR = "#333333"
# PYGMENTS_STYLE = "monokai"
ROBOTS = "index, follow"
# Yıl değişkeni
SITEYEAR = datetime.now().year
# Version değişkeni
VERSION = "1.0.0"
THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE = True
THEME_COLOR_ENABLE_USER_OVERRIDE = True
USE_LESS = True
# --- Paths & Directories ---
THEME_STATIC_DIR = "assets"
THEME = "themes/Baba2"
IMAGE = "path/to/your/image.png"
AVATAR = "https://jaze.top/avatar.png"
PATH = "content"
STATIC_PATHS = [
"images",
"extra",
]
EXTRA_PATH_METADATA = {
"extra/SW.js": {"path": "SW.js"},
"extra/robots.txt": {"path": "robots.txt"},
"extra/ads.txt": {"path": "ads.txt"},
"extra/favicon.ico": {"path": "favicon.ico"},
"extra/favicon.webp": {"path": "favicon.webp"},
}
# --- Table of Content Plugin ---
TOC = {
"TOC_HEADERS": "^h[1-3]",
"TOC_RUN": "true",
"TOC_INCLUDE_TITLE": "false",
}
# --- Social Media ---
SOCIAL = {
"mastodon": "yuceltoluyag",
"matrix": "friday13",
"discord": "188034964879573003",
"github": "yuceltoluyag",
"instagram": "yuceltoluyag",
"youtube": "@yuceltoluyag",
"twitch": "yuceltoluyag",
"buymeacoffee": "friday13",
"github_sponsor": "yuceltoluyag",
}
# --- Menu Items ---
MENUITEMS = (
("Archives", "/archives.html"),
("Categories", "/categories.html"),
("Tags", "/tags.html"),
)
NAVBAR_LINKS = [
{"name": "Home", "url": "/", "target": "_self"},
{"name": "About", "url": "/about/", "target": "_self"},
{"name": "Contact", "url": "/contact/", "target": "_self"},
]
# --- License ---
CC_LICENSE = {
"name": "Creative Commons Attribution-ShareAlike 4.0 International License",
"version": "4.0",
"slug": "by-sa",
"icon": True,
"language": "en_US",
}
# --- Feed Settings ---
FEED_ALL_ATOM = "feeds/all.atom.xml"
CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml"
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
HOME_HIDE_TAGS = True
# USE_FOLDER_AS_CATEGORY = False
MAIN_MENU = True
# --- Pagination Settings ---
DEFAULT_PAGINATION = 6
PAGINATION_PATTERNS = (
(1, "{base_name}/", "{base_name}/index.html"),
(2, "{base_name}/page/{number}/", "{base_name}/page/{number}/index.html"),
)
PAGINATED_TEMPLATES = {"index": None, "tag": None, "category": None, "author": None}
WIDGETS = [
"category.html",
"recent_posts.html",
"search.html",
"tag.html",
"tagcloud.html",
]
# --- Markdown Extensions ---
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {"css_class": "highlight"},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
"markdown.extensions.admonition": {},
"markdown.extensions.toc": {"title": "Table of Contents", "toc_depth": 3},
},
"output_format": "html5",
}
# --- Plugin Settings ---
PLUGIN_PATHS = ["plugins"]
common_plugins = [
"plugins.pelican-toc",
"pelican.plugins.sitemap",
"pelican.plugins.related_posts",
"plugins.fix_sitemap",
"pelican.plugins.neighbors",
"pelican.plugins.seo",
"minchin.pelican.plugins.post_stats",
"pelican.plugins.series",
]
dev_plugins = common_plugins.copy()
prod_extra_plugins = [
"plugins.search",
"plugins.minify",
]
prod_plugins = common_plugins + prod_extra_plugins
PLUGINS = prod_plugins if PUBLISH else dev_plugins
# --- SEO Settings ---
SEO_REPORT = True # SEO report is enabled by default
SEO_ENHANCER = False # SEO enhancer is disabled by default
SEO_ENHANCER_OPEN_GRAPH = False # Subfeature of SEO enhancer
SEO_ENHANCER_TWITTER_CARDS = False # Subfeature of SEO enhancer
SEO_ARTICLES_LIMIT = 10
SEO_PAGES_LIMIT = 10
# --- Google Analytics ---
GTAG = "G-9VKX48YDBH" if PUBLISH else None
# --- Google Affiliate Settings ---