url schema

This commit is contained in:
NN Solex 2023-04-30 14:35:57 +03:00
parent 3b75097fed
commit 4f37ce9c7e
10 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,6 @@
Slug: e8229 Title: Entry 1
Date: 2023-04-12 Date: 2023-04-12
Category: Blue Eyed Donkey Category: Blue Eyed Donkey
Title: Entry 1
Location: 32.70124169424201, 34.9805500394171 Location: 32.70124169424201, 34.9805500394171
I noticed a peculiar sensation in the air as soon as I arrived in town. It was as if an electric charge was coursing through the air beneath the pastoral tranquillity, making me nervous. I looked around, but there was no one to be found. The faint odor of decay lingered around me, mingled with the sweet fragrance of incense. The mix made me feel uneasy, like if I'd stepped into a strange, surreal dream. I noticed a peculiar sensation in the air as soon as I arrived in town. It was as if an electric charge was coursing through the air beneath the pastoral tranquillity, making me nervous. I looked around, but there was no one to be found. The faint odor of decay lingered around me, mingled with the sweet fragrance of incense. The mix made me feel uneasy, like if I'd stepped into a strange, surreal dream.

View file

@ -9,7 +9,7 @@
<article class="hentry"> <article class="hentry">
<header> <header>
<h2 class="entry-title"> <h2 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark">{{ article.title }}</a>
</h2> </h2>
<span class="entry-summary">{{ article.summary }}</span> <span class="entry-summary">{{ article.summary }}</span>
</header> </header>
@ -17,5 +17,5 @@
{% endfor %} {% endfor %}
{% include 'pagination.html' %} {% include 'pagination.html' %}
</section><!-- /#content --> </section>
{% endblock content %} {% endblock content %}

View file

@ -15,13 +15,13 @@
<article class="hentry"> <article class="hentry">
<header> <header>
<h2 class="entry-title"> <h2 class="entry-title">
<a href="/e8229.html" rel="bookmark" title="Permalink to Entry 1">Entry 1</a> <a href="/svbfh1049ck" rel="bookmark">Entry 1</a>
</h2> </h2>
<span class="entry-summary"></span> <span class="entry-summary"></span>
</header> </header>
</article> </article>
</section><!-- /#content --> </section>
</body> </body>
</html> </html>

View file

@ -9,7 +9,7 @@
<body id="index" class="home"> <body id="index" class="home">
<ul> <ul>
<li><a href="/projects/blue-eyed-donkey/index.html">Blue Eyed Donkey</a></li> <li><a href="/projects/blue-eyed-donkey">Blue Eyed Donkey</a></li>
</ul> </ul>
</body> </body>

View file

@ -14,13 +14,13 @@
<article class="hentry"> <article class="hentry">
<header> <header>
<h2 class="entry-title"> <h2 class="entry-title">
<a href="/e8229.html" rel="bookmark" title="Permalink to Entry 1">Entry 1</a> <a href="/svbfh1049ck" rel="bookmark">Entry 1</a>
</h2> </h2>
<span class="entry-summary"></span> <span class="entry-summary"></span>
</header> </header>
</article> </article>
</section><!-- /#content --> </section>
</body> </body>
</html> </html>

View file

@ -34,8 +34,8 @@ MARKDOWN = {
} }
} }
ARTICLE_URL = "{slug}.html" ARTICLE_URL = "{slug}"
ARTICLE_SAVE_AS = "{slug}.html" ARTICLE_SAVE_AS = "{slug}/index.html"
INDEX_SAVE_AS = "tags/index.html" INDEX_SAVE_AS = "tags/index.html"
ARCHIVES_SAVE_AS = '' ARCHIVES_SAVE_AS = ''
AUTHOR_SAVE_AS = '' AUTHOR_SAVE_AS = ''
@ -51,7 +51,7 @@ DEFAULT_DATE_FORMAT = '%Y-%m-%d'
DEFAULT_CATEGORY = 'tag' DEFAULT_CATEGORY = 'tag'
CATEGORIES_SAVE_AS = 'projects/index.html' CATEGORIES_SAVE_AS = 'projects/index.html'
CATEGORY_URL = 'projects/{slug}/index.html' CATEGORY_URL = 'projects/{slug}'
CATEGORY_SAVE_AS = 'projects/{slug}/index.html' CATEGORY_SAVE_AS = 'projects/{slug}/index.html'
DELETE_OUTPUT_DIRECTORY = True DELETE_OUTPUT_DIRECTORY = True

View file

@ -7,6 +7,7 @@ def generate_geohash(generator):
lat, lon = [float(i) for i in article.metadata['location'].replace(' ', '').split(',')] lat, lon = [float(i) for i in article.metadata['location'].replace(' ', '').split(',')]
article.metadata['latlon'] = article.metadata['location'].replace(' ', '') article.metadata['latlon'] = article.metadata['location'].replace(' ', '')
article.metadata['geohash'] = gh.encode(lat, lon, 11) article.metadata['geohash'] = gh.encode(lat, lon, 11)
article.slug = gh.encode(lat, lon, 11)
def register(): def register():
signals.article_generator_finalized.connect(generate_geohash) signals.article_generator_finalized.connect(generate_geohash)