From 4f37ce9c7eef607a057a5b2133dbfc2fe5621a8c Mon Sep 17 00:00:00 2001 From: NN Solex Date: Sun, 30 Apr 2023 14:35:57 +0300 Subject: [PATCH] url schema --- web/__pycache__/pelicanconf.cpython-310.pyc | Bin 1502 -> 1533 bytes web/content/tags/ein_hod_01.md | 3 +-- web/nfc-theme/templates/index.html | 4 ++-- .../projects/blue-eyed-donkey/index.html | 4 ++-- web/output/projects/index.html | 2 +- .../{e8229.html => svbfh1049ck/index.html} | 0 web/output/tags/index.html | 4 ++-- web/pelicanconf.py | 6 +++--- .../__pycache__/geohash.cpython-310.pyc | Bin 861 -> 885 bytes web/plugins/geohash/geohash.py | 1 + 10 files changed, 12 insertions(+), 12 deletions(-) rename web/output/{e8229.html => svbfh1049ck/index.html} (100%) diff --git a/web/__pycache__/pelicanconf.cpython-310.pyc b/web/__pycache__/pelicanconf.cpython-310.pyc index c383d5c4078068dcdf7d5378be0cb08f53b21df8..2cbec3c8ac1fed3caf00d3a9f97d5222ec04f5c5 100644 GIT binary patch delta 153 zcmcb|{g<0JpO=@5fq{V`JIF7kd?Ig;KVOtc3V)Pnia?ZDia?Zjia?Y^ia?ZPieQvf zicmUZlyr)4I%AYf3PY4^ib#}PifEL4idd9Fig=V_ibRxBie!{>ic~sdlu8O`FoUM_ w#uv{SMcJy0b4t@|s{|pmer8@uYQ^MhOu+*D1x5K;smUe9`Vgtj8qC|60MyPb3IG5A delta 122 zcmey%eUFU

- {{ article.title }} + {{ article.title }}

{{ article.summary }}
@@ -17,5 +17,5 @@ {% endfor %} {% include 'pagination.html' %} - + {% endblock content %} diff --git a/web/output/projects/blue-eyed-donkey/index.html b/web/output/projects/blue-eyed-donkey/index.html index c8d8f01..e3c5bbf 100644 --- a/web/output/projects/blue-eyed-donkey/index.html +++ b/web/output/projects/blue-eyed-donkey/index.html @@ -15,13 +15,13 @@ - + \ No newline at end of file diff --git a/web/output/projects/index.html b/web/output/projects/index.html index 8d7a1ff..f4733cc 100644 --- a/web/output/projects/index.html +++ b/web/output/projects/index.html @@ -9,7 +9,7 @@ diff --git a/web/output/e8229.html b/web/output/svbfh1049ck/index.html similarity index 100% rename from web/output/e8229.html rename to web/output/svbfh1049ck/index.html diff --git a/web/output/tags/index.html b/web/output/tags/index.html index 48fccf1..2f96f5a 100644 --- a/web/output/tags/index.html +++ b/web/output/tags/index.html @@ -14,13 +14,13 @@ - + \ No newline at end of file diff --git a/web/pelicanconf.py b/web/pelicanconf.py index 26f51d6..d362fd5 100644 --- a/web/pelicanconf.py +++ b/web/pelicanconf.py @@ -34,8 +34,8 @@ MARKDOWN = { } } -ARTICLE_URL = "{slug}.html" -ARTICLE_SAVE_AS = "{slug}.html" +ARTICLE_URL = "{slug}" +ARTICLE_SAVE_AS = "{slug}/index.html" INDEX_SAVE_AS = "tags/index.html" ARCHIVES_SAVE_AS = '' AUTHOR_SAVE_AS = '' @@ -51,7 +51,7 @@ DEFAULT_DATE_FORMAT = '%Y-%m-%d' DEFAULT_CATEGORY = 'tag' CATEGORIES_SAVE_AS = 'projects/index.html' -CATEGORY_URL = 'projects/{slug}/index.html' +CATEGORY_URL = 'projects/{slug}' CATEGORY_SAVE_AS = 'projects/{slug}/index.html' DELETE_OUTPUT_DIRECTORY = True diff --git a/web/plugins/geohash/__pycache__/geohash.cpython-310.pyc b/web/plugins/geohash/__pycache__/geohash.cpython-310.pyc index 8d7d0adc35bb94b0229b7390cf62c5d7a43db998..f212e42616c001d8d0fa24091ac1737cf4a2815d 100644 GIT binary patch delta 154 zcmcc1_LYq{pO=@5fq{WRGSDx@aw2b;L=6K2Lk&X~g9}5fMJ;0rV+~^#V;Mt{^~Bjh z0wpX9SZkPSm{T|wGS@K1vrT;ag^_*oBSr(ZTP(#nrRkG}nB2q!7#JA17`YhL7$q1* z7zG%a8d!c8NleaRN@A3le4a^>mxqCYp_qw*fkA+=NP6;LCJiB;ArBqzHt IOE7W(05b<8CIA2c delta 124 zcmey$c9)GepO=@5fq{V`!rCu|bs}$>L=FQ3Lk&X~g9}5fK`mnnV+~^#V;Mt{@x<9d z6aRi;WSjhn(O|L$lbZ-10|NsWBNw9@qXeS}BU1y*pCa+eElf#_;**~686K7yxD3Y4&%xuWW4gdnx8a@C3 diff --git a/web/plugins/geohash/geohash.py b/web/plugins/geohash/geohash.py index a8d1e79..fa8589d 100644 --- a/web/plugins/geohash/geohash.py +++ b/web/plugins/geohash/geohash.py @@ -7,6 +7,7 @@ def generate_geohash(generator): lat, lon = [float(i) for i in article.metadata['location'].replace(' ', '').split(',')] article.metadata['latlon'] = article.metadata['location'].replace(' ', '') article.metadata['geohash'] = gh.encode(lat, lon, 11) + article.slug = gh.encode(lat, lon, 11) def register(): signals.article_generator_finalized.connect(generate_geohash) \ No newline at end of file