<commit_before>{# Cache the sidebar, depending on the stuff in the 'article' category #}
{% cache 3600 cat='article' %}
	
	{% if m.category.tweet %}
	
		{% with m.search[{latest cat='tweet' pagelen=4}] as r %}
			{% if r.result %}
				<h2>Tweets</h2>
				<ul class="shouts-list">
					{% for tw in r.result %}
						<li>
							<p>
								<img width="28" height="28" src="{{ m.rsc[tw].tweet['user'][2]['profile_image_url'] }}" />
								<span class="tweet-body">{{ m.rsc[tw].body|twitter }}</span>
								<span class="tweet-date-time">from {{ m.rsc[tw].tweet["source"] }} by {{ m.rsc[tw].tweet['user'][2]['screen_name'] }}</span>
							</p>
						</li>
					{% endfor %}
				</ul>
			{% endif %}
		{% endwith %}
	
	{% endif %}
	
	<h2>Archive</h2>
	<ul class="simple-list">
		{% for year, months in m.search[{archive_year_month cat='article'}] %}
	    	<li>
	        	<a href="{% url archives_y year=year %}">{{ year }}</a>
		        <ul>
	    	        {% for row in months %}
	        	    	<li><a href="{% url archives_m year=year month=row.month %}">{{ row.month_as_date|date:"F" }}</a> ({{ row.count }})</li>
		           	{% endfor %}
	    	    </ul>
	    	</li>
	    {% endfor %}
	</ul>
	
	{% if show_cloud %}
		<h2>Keywords</h2>
		<ul class="simple-list">
		    {% for id, count in m.search[{keyword_cloud cat='article'}] %}
		    	<li><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a> ({{ count }})</li>
		    {% endfor %}
		</ul>
	{% endif %}
	
	{% if m.rsc[id].is_editable %}
		{% button text=_"edit this page" action={redirect dispatch="admin_edit_rsc" id=id} %}
	{% endif %}

{% endcache %}<commit_msg>Move edit link outside the cached info.<commit_after>{# Cache the sidebar, depending on the stuff in the 'article' category #}
{% cache 3600 cat='article' %}
	
	{% if m.category.tweet %}
	
		{% with m.search[{latest cat='tweet' pagelen=4}] as r %}
			{% if r.result %}
				<h2>Tweets</h2>
				<ul class="shouts-list">
					{% for tw in r.result %}
						<li>
							<p>
								<img width="28" height="28" src="{{ m.rsc[tw].tweet['user'][2]['profile_image_url'] }}" />
								<span class="tweet-body">{{ m.rsc[tw].body|twitter }}</span>
								<span class="tweet-date-time">from {{ m.rsc[tw].tweet["source"] }} by {{ m.rsc[tw].tweet['user'][2]['screen_name'] }}</span>
							</p>
						</li>
					{% endfor %}
				</ul>
			{% endif %}
		{% endwith %}
	
	{% endif %}
	
	<h2>Archive</h2>
	<ul class="simple-list">
		{% for year, months in m.search[{archive_year_month cat='article'}] %}
	    	<li>
	        	<a href="{% url archives_y year=year %}">{{ year }}</a>
		        <ul>
	    	        {% for row in months %}
	        	    	<li><a href="{% url archives_m year=year month=row.month %}">{{ row.month_as_date|date:"F" }}</a> ({{ row.count }})</li>
		           	{% endfor %}
	    	    </ul>
	    	</li>
	    {% endfor %}
	</ul>
	
	{% if show_cloud %}
		<h2>Keywords</h2>
		<ul class="simple-list">
		    {% for id, count in m.search[{keyword_cloud cat='article'}] %}
		    	<li><a href="{{ m.rsc[id].page_url }}">{{ m.rsc[id].title }}</a> ({{ count }})</li>
		    {% endfor %}
		</ul>
	{% endif %}
	
{% endcache %}

{% if m.rsc[id].is_editable %}
	{% button text=_"edit this page" action={redirect dispatch="admin_edit_rsc" id=id} %}
{% endif %}
{'fraction_non_alphanumeric': 0.23208295211954863, 'fraction_numerical': 0.01036901494358036, 'mean_word_length': 2.6403995560488345, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6634381', 'n_tokens_mistral': 1544, 'n_tokens_neox': 1227, 'n_words': 256}