<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Tim.Wienk.name</title><link href="https://tim.wienk.name/" rel="alternate"></link><link href="https://tim.wienk.name/en/atom.xml" rel="self"></link><id>https://tim.wienk.name/</id><updated>2017-03-12T00:00:00+01:00</updated><entry><title>Dutch general elections 2017</title><link href="https://tim.wienk.name/en/articles/dutch-elections-2017" rel="alternate"></link><published>2017-03-12T00:00:00+01:00</published><updated>2017-03-12T00:00:00+01:00</updated><author><name>Tim Wienk</name></author><id>tag:tim.wienk.name,2017-03-12:/en/articles/dutch-elections-2017</id><summary type="html">&lt;p&gt;A politically themed article on my website, I did not see
that coming. In the light of the general elections coming
up in a few days, I decided to work out my own answers to
the Dutch "StemWijzer" (Vote Match) statements.&lt;/p&gt;</summary><content type="html">&lt;section id="stemwijzer-results"&gt;&lt;h2&gt;&lt;span&gt;StemWijzer results&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;First I'll share the result of my final StemWijzer answers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pirate Party NL (80%)&lt;/li&gt;
&lt;li&gt;SP (67%)&lt;/li&gt;
&lt;li&gt;Partij voor de Dieren, De Burger Beweging (63%)&lt;/li&gt;
&lt;/ol&gt;
&lt;aside&gt;
&lt;h3 id="stemwijzer"&gt;&lt;span&gt;StemWijzer&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;a href="https://home.stemwijzer.nl/over-stemwijzer/"&gt;StemWijzer&lt;/a&gt; is a "&lt;a href="https://en.wikipedia.org/wiki/Vote_Match"&gt;Vote Match&lt;/a&gt;" application in the Netherlands
that aims to help voters to make (or confirm) their choices for the
general elections. The StemWijzer has been created on paper since 1989,
and since 1998 there is an internet version as well.&lt;/p&gt;
&lt;p&gt;For the last few general elections, in 2006, 2010 and 2012, the
StemWijzer was used by between 4.2 million and 4.8 million people.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;I decided to share my results and answers to the StemWijzer statements
on my website for a number of reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For the answers to a lot of questions I tended towards "neither agree
   or disagree" because I missed details about a lot of subjects, but to
   get a relevant result I did want to actually form an opinion. By
   writing this text, I had an extra reason to think about some subjects
   or to dive deeper into them.&lt;/li&gt;
&lt;li&gt;I was actually surprised about the fact that the PPNL came out as top
   result, mostly because the statements don't directly have to do with
   the reasons I was already interested in this party.&lt;/li&gt;
&lt;li&gt;The PPNL gets relatively little attention in the Netherlands, and I
   felt that my StemWijzer result was positive for the party. If even
   only one person reads this text and seriously considers the PPNL
   because of it, I think that's a good thing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;&lt;section id="pirate-party-nl"&gt;&lt;h2&gt;&lt;span&gt;Pirate Party NL&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Like I mentioned, I was already interested in the &lt;a href="https://piratenpartij.nl/"&gt;PPNL&lt;/a&gt;, in
particular because their key points revolve around digitisation and
privacy, two subjects I come in contact with on a daily basis during my
work and which I personally (partially because of that) feel are very
important.&lt;/p&gt;
&lt;p&gt;Additionally I think there is (still) way too little knowledge and
attention for all matters concerning IT and digitisation. Even if only
one seat in the parliament goes to a party that really commits to these
subjects, they will at least be brought to attentention more, forcing
other political parties to take clear positions and to treat them more
substantively.&lt;/p&gt;
&lt;p&gt;I was surprised that the PPNL was the at the top of my StemWijzer
results. After doing some more research and reading the party's own
responses to the statements, I have to conclude that my generally
positive opinion about the PPNL was actually too negative. I did find
them interesting already, but they have developed a better thought out
and more complete election programme than I realised, and they had well
founded answers to all of the statements. Not all answers match mine,
but a very large amount of them do.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="election-programme-2017"&gt;&lt;span&gt;Election programme 2017&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The PPNL made available a very well readable &lt;a href="https://tk2017.piratenpartij.nl/wp-content/uploads/sites/12/2017/03/PPNL-Verkiezingsprogramma-2017-English.pdf"&gt;abridged election
programme&lt;/a&gt;. Just reading the titles already paints a good picture of
the party's train of thought.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;Not very surprisingly but unfortunately I do think that a lot of people
don't take the Pirate Party serious because of the name, hopefully this
will improve with time as we get used to the name. I did of course know
that the party is serious and that it does have a broad perspective, but
it turns out to be better than I thought. The PPNL is certainly a
serious political party, there is &lt;a href="https://pp-international.net/"&gt;international collaboration&lt;/a&gt; with
other Pirate Parties and it's grown way past the "one issue" stadium.&lt;/p&gt;
&lt;p&gt;I think that the PPNL is a good option for a lot of left progressive
oriented voters who attach some extra value to the "let's do everything
on the internet" effects.&lt;/p&gt;
&lt;/section&gt;&lt;section id="statements-and-answers"&gt;&lt;h2&gt;&lt;span&gt;Statements and answers&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This will be the longest part of this article, below I will go through
all thirty statements from the StemWijzer and I'll share my answers and
reasoning behind the answers.&lt;/p&gt;
&lt;section id="1-binding-referendum"&gt;&lt;h3&gt;&lt;span&gt;1. Binding referendum&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be a binding referendum, through which the people can
block legislation adopted by the parliament.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Of course I am all for participation of "the people" in decision making,
but the problem with referenda is that people, who generally are not
well versed in the issues at hand, are asked to give their opinion about
matters of which only (or sometimes not even) the superficial parts are
visible.&lt;/p&gt;
&lt;p&gt;In my opinion is this the precisely the reason why we choose
representatives in our democracy. These representatives are working with
these kinds of issues on a daily basis and therefore do have the ability
to form a well considered opinion, and therefore to make a well
considered decision.&lt;/p&gt;
&lt;section id="so-how-should-it-work"&gt;&lt;h4&gt;&lt;span&gt;So how should it work?&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;The chosen representatives have at least the following to tasks with
respect to their voters:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Gather full and nuanced information and make sure to stay informed
    about the (political) issues and solutions at hand, so they are able
    to represent their voters fairly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inform their voters fairly and clearly about these issues and stay
    informed about the opinions of the voters they represent.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When this is done well enough, a nationwide referendum is not necessary
and politicians won't be burdened by thoughtless or misguided decisions
made by "the people".&lt;/p&gt;
&lt;p&gt;When a representative or political party does not execute these tasks
(by only promoting populist and/or superficial explanations, or by not
verifying with their supports at all), they are not being very
representative at all, and they don't deserve a parliament seat in my
opinion.&lt;/p&gt;
&lt;/section&gt;&lt;/section&gt;&lt;section id="2-compulsary-community-service"&gt;&lt;h3&gt;&lt;span&gt;2. Compulsary community service&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be compulsary community service for young people. They
can then decide to serve in the military, in law enforcement or in
health care.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;In my opinion these kinds of obligations are inefficient and
unnecessary. Forcing (young) people to do community service while they
don't choose to do so, won't motivate them and won't lead to quality
service.&lt;/p&gt;
&lt;p&gt;As part of the education system people will end up at organisations or
companies that do fit their ideas and interests through internships and
graduation assignments.&lt;/p&gt;
&lt;/section&gt;&lt;section id="3-anonymous-job-applications"&gt;&lt;h3&gt;&lt;span&gt;3. Anonymous job applications&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;To prevent discrimination based on name, anonymous job applications
for the government or public institutions should be the rule.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Trying to combat discrimination in this way is only symptom relief, it's
similar to thoughtlessly taking pain killers against a head ache: it's
better to figure out why you keep having a head ache. The actual problem
is only hidden this way.&lt;/p&gt;
&lt;p&gt;Because of this, I feel that anonymous job applications does not have to
become the (or a) rule, but it also shouldn't be a problem if an
organisation does want to use this. All organisations (government or
other) should be able to decide for themselves whether anonymous
applications are have added vlue for them.&lt;/p&gt;
&lt;p&gt;If a government organisation is guilty of discrimination based on name
(or anything, really), there is a different problem to solve than an
application problem.&lt;/p&gt;
&lt;/section&gt;&lt;section id="4-group-defamation"&gt;&lt;h3&gt;&lt;span&gt;4. Group defamation&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Defamation of groups based on race, religion or sexuality should no
longer be punishable by law.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Openly and intended defamation of groups contributes to a society in
which prejudices, discrimination and maybe even hate based on belonging
to a group is normal.&lt;/p&gt;
&lt;p&gt;At the moment it is very popular to blame groups of people for all sorts
of things, be it homosexuals or foreigners. It seems very illogical to
me to ease regulations in this area at this time.&lt;/p&gt;
&lt;/section&gt;&lt;section id="5-cultivation-and-sale-of-cannabis"&gt;&lt;h3&gt;&lt;span&gt;5. Cultivation and sale of cannabis&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The cultivation and sale of cannabis should be legalised.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;The current policy of tolerance around the cultivation of cannabis is
illogical and unhealthy in my opinion.&lt;/p&gt;
&lt;p&gt;By legalising it instead, it's possible to set up regulations and
quality standards and it would even be possible to add taxes, like on
alcohol. In this way it will be easier to inspect and control and it
will benefit the quality of the products (and therefore the public
health).&lt;/p&gt;
&lt;/section&gt;&lt;section id="6-early-release-of-prisoners"&gt;&lt;h3&gt;&lt;span&gt;6. Early release of prisoners&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The early conditional release of prisoners should stop. They should
serve their sentences completely.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Firstly I think it's important to emphasize that the early release is a
conditional release, and it's only possible for sentences of more than a
year.&lt;/p&gt;
&lt;p&gt;Furthermore the case is that judges calculate the early release in their
decisions, changing this will actually make current sentences longer
than they were meant to be.&lt;/p&gt;
&lt;p&gt;I think/hope that, by offering criminals a prospect of early release,
there is an (extra) reason for them to try and improve and be able to
function normally in society. However, I do think it's a good idea to
check whether there should be more freedom restricting conditions
applied to early releases more often.&lt;/p&gt;
&lt;/section&gt;&lt;section id="7-corporate-tax"&gt;&lt;h3&gt;&lt;span&gt;7. Corporate tax&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The taxes on profits of enterprises (corporate tax) should be lowered.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;When thinking about this logically, you'll quickly come to the
conclusion that lowering these taxes will greatly benefit
multinationsals and have a way smaller impact on smaller enterprises.
This approach does not seem the right one to me.&lt;/p&gt;
&lt;p&gt;If tax relief is necessary for enterprises, there are other taxes to
look at (like income taxes), which will benefit employees as well, or
other options (like tax deductions), which will benefit small
enterprises more.&lt;/p&gt;
&lt;/section&gt;&lt;section id="8-taxes-highest-income-groups"&gt;&lt;h3&gt;&lt;span&gt;8. Taxes highest income groups&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The highest income groups should pay more taxes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;This statement is overly simplified, it seems designed in a way so
everyone with a low or medium income can just vote "yes".&lt;/p&gt;
&lt;p&gt;In my opinion the highest income groups don't have to pay more, but the
low and medium income groups should have to pay less.&lt;/p&gt;
&lt;p&gt;Perhaps (but probably not) it's as easy as decreasing the tax
percentages for the low and middle income groups, and increasing them
for the highest group, making it so the highest income group does still
pay approximately the same amount.&lt;/p&gt;
&lt;p&gt;Additionally I heard multiple policital parties talk about fighting tax
evasion, a higher increase in tax does not exist for these people.&lt;/p&gt;
&lt;/section&gt;&lt;section id="9-temporary-employment-contracts"&gt;&lt;h3&gt;&lt;span&gt;9. Temporary employment contracts&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The period in which one can sign multiple temporary employment
contracts in succecssion should be longer than two years.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;If a company has employed someone for two years, it's very hard to call
this employee's position temporary, and after two years the company will
probably have established a certain level of trust in this employee.&lt;/p&gt;
&lt;p&gt;It only seems fair that this situation will lead to some assurances in
employee's contract as well.&lt;/p&gt;
&lt;/section&gt;&lt;section id="10-retirement-age-65"&gt;&lt;h3&gt;&lt;span&gt;10. Retirement age 65&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The retiremnet age should be set back to 65 years old.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;I agree in principle, although I would rather see the retirement
regulations changed more than this (or even superseded by the
implementation of an universal basic income).&lt;/p&gt;
&lt;p&gt;It seems logical to me to link the retirement age to the number of years
worked. In practice one starts working at an earlier age in the more
physically demanding professions, while the less physically demanding
professions require a longer period of education, making it so the
retirement age for physically demanding professions would be lower in
practice.&lt;/p&gt;
&lt;p&gt;Additionally I feel that someone should be able to decide themselves if
they want to stop working at the age of 65 (or after the established
amount of years worked). For the "extra" years someone works (and
doesn't receive state pension), the later state pension can be adjusted.&lt;/p&gt;
&lt;/section&gt;&lt;section id="11-insurance-independent-professionals"&gt;&lt;h3&gt;&lt;span&gt;11. Insurance independent professionals&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be compulsary insurance against occupational disability
and disease for all independent professionals.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;If one chooses to work as an independent professional or freelancer, one
chooses for certain liberties and responsibilities, among which the
liberty and responsibility of around these insurances. Assessment of
risks is a large part of running a business, and these risks are a part
of that. It doesn't seem desireable that the government would impose
these kinds of obligations in these cases.&lt;/p&gt;
&lt;p&gt;As far I as understood, this is mostly a problem for pseudo-independant
professionals. Pseudo-independance is a problem that should be addressed
in itself, not by just forcing extra insurances.&lt;/p&gt;
&lt;/section&gt;&lt;section id="12-student-loan-system"&gt;&lt;h3&gt;&lt;span&gt;12. Student loan system&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The loan system for students should be abolished. The basic student
grant should return.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;Education is very important for our future and should be accessible for
everyone with a threshold that is as low as possible. The current loan
system has the opposite effect, people feel more stress and insecurity
about the financial consequences of persuing a degree.&lt;/p&gt;
&lt;p&gt;I feel that reintroducing the basic student grant is a logical step
after this failed "experiment".&lt;/p&gt;
&lt;p&gt;Additionally I do think that the student travel product should be
changed to only be valid for a specific route, rather than nation wide,
with possibly lifting the week-or-weekend limit.&lt;/p&gt;
&lt;section id="study-credit-instead-of-first-four-years"&gt;&lt;h4&gt;&lt;span&gt;Study credit instead of first four years&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;I am rather impressed with the Flemish study credit system, perhaps this
system can be used as inspiration for a way to determine the height of
the grant and to make it fit part time studies better.&lt;/p&gt;
&lt;p&gt;In this system a student starts with 140 points which are spent and (if
things go well) earned back during the educational career, based on
these points the student is subsidised.&lt;/p&gt;
&lt;p&gt;In the Dutch system, the height of the grant could be determined based
on a similar credit, where each enrolled ECTS credit counts as a point,
and at 60 points in an academic year the maximum grant is paid out.
Points will be earned back when a subject is completed successfully in
an academic year. As long as someone has 60 or more points left over,
one can claim the full grant, provided that they enroll for 60 ECTS
credits.&lt;/p&gt;
&lt;p&gt;In the Flemish system, the first 60 points are earnt back double, and
when finishing a study 140 points are deducted of the remaining credit.
With a perfect score, a student would then be left with 60 points for a
potential second study.&lt;/p&gt;
&lt;/section&gt;&lt;/section&gt;&lt;section id="13-money-for-culture"&gt;&lt;h3&gt;&lt;span&gt;13. Money for culture&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;More money should be invested in art and culture.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Neither agree or disagree.&lt;/p&gt;
&lt;p&gt;I haven't been able to form a well enough opinion on this matter, mostly
because I don't have a good overview of the current distribution of the
money spent on art and culture.&lt;/p&gt;
&lt;p&gt;The image that most of the political parties paint is that the
distribution should be improved, but that more money may not be
necessary.&lt;/p&gt;
&lt;/section&gt;&lt;section id="14-islamic-immigrants"&gt;&lt;h3&gt;&lt;span&gt;14. Islamic immigrants&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The Netherlands should close its borders for islamic immigrants.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Rejecting people based on religion is against very fundamental values of
the Netherlands (and of myself): the freedom of religion and the right
to be treated equally.&lt;/p&gt;
&lt;/section&gt;&lt;section id="15-childrens-pardon"&gt;&lt;h3&gt;&lt;span&gt;15. Children's pardon&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Children of asylum seekers who grew up in the Netherlands should be
allowed to remain in the Netherlands (children's pardon).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;The precise details of this subject are really not easy, but in the
general sense I strongly feel that children should be protected.&lt;/p&gt;
&lt;p&gt;If a child was raised in the Netherlands, then the Netherlands is their
home base. By forcing families to leave the Netherlands, while their
children speak Dutch and are part of the Dutch society, they have a
large part of their lives taken away from them.&lt;/p&gt;
&lt;p&gt;Of course there have to be conditions to comply to, especially for the
parents, but these have to be fair and achievable. The way in which the
parents act during their stay in the Netherlands can be used as basis
for this, but then his has to be clear to them from the start.&lt;/p&gt;
&lt;/section&gt;&lt;section id="16-shelter-illegals"&gt;&lt;h3&gt;&lt;span&gt;16. Shelter illegals&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The government should prohibit municipalities to offer shelter to
illegal foreigners.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;When people reside illegally in the Netherlands (reason left aside),
they have to be guided correctly to leave the Netherlands. I don't think
that not offering (or being allowed to offer) these people shelter is
the right way to arrange this.&lt;/p&gt;
&lt;p&gt;Even if you don't think of the inhuman aspect of prohibiting to offer
shelter, it would even make the eviction process harder if these people
have to live on the streets, and it would most probably cause
inconvenience for the people that do reside here legally.&lt;/p&gt;
&lt;/section&gt;&lt;section id="17-mortgage-interest"&gt;&lt;h3&gt;&lt;span&gt;17. Mortgage interest&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The arrangements for the tax deduction of mortgage interest should be
eroded further.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;As far as I can assess, the mortgage interest tax deduction and other
mortgage regulations are currently well organised.&lt;/p&gt;
&lt;p&gt;However, I am of the opinion that it would be good to set a maximum
mortgage value or purchase amount on the possibility to receive mortgage
interest tax reduction, so the benefits end up with the right people.&lt;/p&gt;
&lt;/section&gt;&lt;section id="18-rental-tax"&gt;&lt;h3&gt;&lt;span&gt;18. Rental tax&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Housing corporations should build more low-cost rental houses.
Therefore, the taxes they have to pay for rental housing (rental tax)
should be abolished.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Neither agree or disagree.&lt;/p&gt;
&lt;p&gt;I really don't know a lot about the details around rental tax, mostly
because of that reason I answered "neither agree or disagree".&lt;/p&gt;
&lt;p&gt;I do agree that there should be more low-cost rental houses, but I am
not convinced that the rental tax should be abolished. It seems more
logical to me to implement tax deductions specifically aimed at
stimulating the preferred policy (stimulating the right types and prices
of housing, and stimulating sustainability and environmental
friendliness).&lt;/p&gt;
&lt;/section&gt;&lt;section id="19-schiphol"&gt;&lt;h3&gt;&lt;span&gt;19. Schiphol&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Airport Schiphol should be allowed to expand.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;Every company, including Schiphol, should be able to expand and grow, as
long as they abide by the rules. For an airport the rules regarding
effects on the environment are very important, but as long as Schiphol
sticks to them, I don't think the government should stop expansion.&lt;/p&gt;
&lt;p&gt;If the current rules are not good enough, that is a separate problem,
and that should be the topic of discussion instead.&lt;/p&gt;
&lt;/section&gt;&lt;section id="20-kilometer-tax"&gt;&lt;h3&gt;&lt;span&gt;20. Kilometer tax&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The government should not tax the possession of a car, but the number
of kilometers traveled.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;I personally think that it's important to tax fuel consumption, not
kilometers (or miles), and this is already done right now.&lt;/p&gt;
&lt;p&gt;Pollution is a result of the type and amount of fuel used, not directly
the distance traveled. Constantly accelerating and breaking in a city
will be very polluting, but won't be a lot of distance. By taxing fuel
consumption, the use of fuel-efficient and less polluting cars will be
stimulated.&lt;/p&gt;
&lt;p&gt;Additionally, implementing a system like this that is somewhat
fraud-proof will be very complex and expensive, it would require the
government to collect a lot of information that is currently private,
and I doubt whether it would reduce the car usage of the "large-scale
users". Investing in public transportation seems more worthwile.&lt;/p&gt;
&lt;/section&gt;&lt;section id="21-new-roads"&gt;&lt;h3&gt;&lt;span&gt;21. New roads&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be more money invested in the construction of new roads.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Similar to the previous subject, I think it is more worthwile to invest
in public transportation instead of this as well.&lt;/p&gt;
&lt;p&gt;In the current situation people are more sure of their arrival time by
travelling by car through traffic jams, than by taking a train with its
random delays. By solving the delays and related problems, people would
be able to trust public transport more.&lt;/p&gt;
&lt;p&gt;On top of that, in most cases traveling by car is cheaper the moment you
add another person to your car.&lt;/p&gt;
&lt;p&gt;Public transport should be made more reliable and appealing.&lt;/p&gt;
&lt;/section&gt;&lt;section id="22-coal-plants"&gt;&lt;h3&gt;&lt;span&gt;22. Coal plants&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;All coal plants may continue to remain active for the time being.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;I understand that it's not possible to close all coal plants at once,
but it certainly can't be objective to keep them all open.&lt;/p&gt;
&lt;p&gt;Bit by bit, but as fast as possible, the coal plants should be closed
and replaced by sustainable alternatives.&lt;/p&gt;
&lt;/section&gt;&lt;section id="23-vat-rate-meat"&gt;&lt;h3&gt;&lt;span&gt;23. VAT rate meat&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Meat should have the higher VAT rate of 21 percent applied.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Eating meat by itself is not unhealthy and it is possible to produce
meat in a sustainable manner. Fact is, however, that it would be a
healthy idea for a lot of people to eat less meat than they currently
do.&lt;/p&gt;
&lt;p&gt;People should be made aware of this of this, and should learn to
recognise what their body needs, since that's different for everyone.&lt;/p&gt;
&lt;p&gt;Eating no meat at all is not necessary if you ask me, that is something
people should decide for themselves. For this reason I don't think
raising the VAT rate to 21% is a good idea, meat is "just" a type of
food and raising the VAT rate would make it less accessible.&lt;/p&gt;
&lt;p&gt;What I would like to see is encouragement of local sustainable
production of food. Instead of specifically taxing meat, I would prefer
to see tax reductions for locally and well produced food in general.&lt;/p&gt;
&lt;/section&gt;&lt;section id="24-completed-life"&gt;&lt;h3&gt;&lt;span&gt;24. Completed life&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Elderly people who feel that their life is completed should be able to
get help to end their lives.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;If someone decides to not want to live anymore, that is their choice and
that choice should be respected, and if you ask me that does not only go
for elderly people.&lt;/p&gt;
&lt;p&gt;When it can be determined with sufficient certainty that the choice has
been made on their own considerations and is not based on pressure or
solvable problems, I think a person should be able to get help to end
their live.&lt;/p&gt;
&lt;p&gt;I do understand that not everyone thinks the same way about this. In
case of conscientious objections, a doctor should be able to transfer
this to a colleague.&lt;/p&gt;
&lt;/section&gt;&lt;section id="25-abolishment-of-deductible"&gt;&lt;h3&gt;&lt;span&gt;25. Abolishment of deductible&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The health care deductible should be abolished, even if this means
that insurance contributions will rise.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;The goal of a deductible is, in principe, to give someone an extra
reason to be more careful with that which is insured. This does not
apply to health care insurance, since health care is required to be
actually treat your body and mind "carefully" and should therefore not
be hindered.&lt;/p&gt;
&lt;p&gt;The deductible has a number of undesired side effects. The most
important ones are, in my opinion:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;people with a low income are less likely to seek treatment out of
    fear for the costs,&lt;/li&gt;
&lt;li&gt;the chronically ill already know at the start of every year that
    they will have to add the deductible to their health care costs,
    whicn in practice simple makes the deductible a higher insurance
    contribution for them.&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;&lt;section id="26-national-health-care-fund"&gt;&lt;h3&gt;&lt;span&gt;26. National health care fund&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be national health care fund, so the current system of
private health care insurances can be removed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Agree.&lt;/p&gt;
&lt;p&gt;The current system of private health care insurances does not work well.
Health care insurances are very expensive, on paper there is competition
but in practice there is not.&lt;/p&gt;
&lt;p&gt;By covering the base health care insurance through a national health
care fund, everyone will have access to health care for a fair price
(again), and the discussion about freedom of health care / hospital
choice can be closed as well.&lt;/p&gt;
&lt;/section&gt;&lt;section id="27-defence-expenditure"&gt;&lt;h3&gt;&lt;span&gt;27. Defence expenditure&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The defence expenses should increase significantly the next few years
towards 2 percent of the national income (the NATO standard).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Neither agree or disagree.&lt;/p&gt;
&lt;p&gt;In principle we have an agreement with the other NAVO member states to
spend 2% of our Gross Domestic Product on defence, in practice, however,
only very few states actually actually make it to that percentage, most
of the European states are between 1% and 1.5%.&lt;/p&gt;
&lt;p&gt;On top of that, because of the current stance of Russia and North Korea,
the necessity to be able to take anti-terrorist measures and because of
the reports of outdated and poorly maintained military equipment, it
appears to be justifiable to have to spend more money on defence.&lt;/p&gt;
&lt;p&gt;However, with the information I have, I cannot estimate how much really
is necessary (and whether 2% of the GDP is realistic) for us and our
NATO allies to be able to keep things safe and peaceful, because that
must remain the goal: to keep peace.&lt;/p&gt;
&lt;/section&gt;&lt;section id="28-european-army"&gt;&lt;h3&gt;&lt;span&gt;28. European army&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;There should be a European army.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;Even though this sounds like a plan that could save time and money, and
with which Europe could act more serious when necessary, I do not think
this would work out like that in practice. In particular because of the
current insecurities regarding the EU, I think launching a project like
this now would only cause more differences of opinion and more
anti-Europe sentiments among the people.&lt;/p&gt;
&lt;p&gt;I do think it's a very good idea to look into closer cooperation with
other European countries in this area, and perhaps we can try and
experience a joint army on a smaller scale (like the BeNeLux) first.&lt;/p&gt;
&lt;/section&gt;&lt;section id="29-development-aid"&gt;&lt;h3&gt;&lt;span&gt;29. Development aid&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The Netherlands should spend more money on the development of poor
countries.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Neither agree or disagree.&lt;/p&gt;
&lt;p&gt;With my limited knowledge about the current effects and distribution of
the money spent on development aid, I can't determine whether there is
more or less money required.&lt;/p&gt;
&lt;p&gt;As long as development aid is aimed at the long term, by increasing the
knowledge and improving the market position of a developing country, so
a country in time can stand on its own and can continue the efforts
themselves, I think the money is properly spent.&lt;/p&gt;
&lt;/section&gt;&lt;section id="30-eu-membership"&gt;&lt;h3&gt;&lt;span&gt;30. EU membership&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The Netherlands should leave the European Union (EU).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Disagree.&lt;/p&gt;
&lt;p&gt;I think that a united Europe is very important for a small country like
the Netherlands. The internal market and the free movement of people and
goods is very important to us, and losing that would be be a large blow.&lt;/p&gt;
&lt;p&gt;Additionally, the negotioating position of a united Europe with respect
to other large parties, such as the United States, is a lot better when
it concerns trade agreements and large scale approach to tackle
environmental issues.&lt;/p&gt;
&lt;p&gt;This does not mean that I think the EU currently works well.&lt;/p&gt;
&lt;p&gt;For example, I am of the opinion that the current wide spread
anti-refugees sentiment is largely due to the bad preparation and
resulting ad hoc made decisions within the EU. Because this issue is
about people from outside of the EU borders coming in, and because we
need a solution in which all EU countries can and want to help, I think
it is the EU's task to prepare its member countries well enough.&lt;/p&gt;
&lt;p&gt;Changes need to be made, firstly in the area of transparency, but the EU
also really needs to put more effort in preparation and anticipation of
future events, so decisions can be made collectively beforehand.&lt;/p&gt;
&lt;/section&gt;&lt;/section&gt;</content><category term="article"></category></entry><entry><title>Ch-ch-ch-ch-changes</title><link href="https://tim.wienk.name/en/articles/website-changes" rel="alternate"></link><published>2017-03-04T00:00:00+01:00</published><updated>2017-03-04T00:00:00+01:00</updated><author><name>Tim Wienk</name></author><id>tag:tim.wienk.name,2017-03-04:/en/articles/website-changes</id><summary type="html">&lt;p&gt;My (new) website has been online for a few months, I'm
fairly satisfied with how it turned out and therefore want
to explain how this website came to be, covering reasons
for and technical details of some decisions.&lt;/p&gt;</summary><content type="html">&lt;section id="curriculum-vitae"&gt;&lt;h2&gt;&lt;span&gt;Curriculum vitae&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Every now and then you are reminded of your CV, either by yourself or
because of people around you looking for a job and/or updating theirs.
In most cases I decide that I should update mine as well and then in the
end I don't. However, this time, maybe because many things are (looking
to be) changing around me in the near future, I got myself to actually
do it.&lt;/p&gt;
&lt;p&gt;My outdated CV wasn't actually as bad as I expected. What I found was a
document with a half finished LaTeX layout, using the default (not very
pretty) Latin Modern font, and work experience dating back a few years.
After redoing parts of the CV, I finished the layout and managed to
update its contents, too.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="my-updated-cv"&gt;&lt;span&gt;My updated CV&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;You can access my CV on &lt;a href="/en/cv"&gt;its own page&lt;/a&gt;, but in case you're interested,
you can find it here as well:&lt;/p&gt;
&lt;ul class="section"&gt;
    &lt;li&gt;
        &lt;span class="language"&gt;English&lt;/span&gt;
        &lt;span class="separator"&gt;–&lt;/span&gt;
        &lt;a class="title" href="https://tim.wienk.name/media/cv/timwienk-cv-english.pdf"&gt;Download CV&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;span class="language"&gt;Dutch&lt;/span&gt;
        &lt;span class="separator"&gt;–&lt;/span&gt;
        &lt;a class="title" href="https://tim.wienk.name/media/cv/timwienk-cv-nederlands.pdf"&gt;Download CV&lt;/a&gt;
    &lt;/li&gt;
&lt;/ul&gt;


&lt;/aside&gt;
&lt;p&gt;Next up, I wanted to store my CV on my personal website for easy access.
Great idea, except my website looked... "old". It hardly contained any
relevant information and it didn't even look decent.&lt;/p&gt;
&lt;p&gt;My previous website was originally built with &lt;a href="https://keetology.com/"&gt;Mark "keeto" Obcena&lt;/a&gt;'s
&lt;a href="https://github.com/keeto/raccoon"&gt;Raccoon&lt;/a&gt; framework, which was very interesting at the time, but after
moving things around servers, my website ended up being stripped down
and served by an old test installation of the platform we develop at the
company I work at: not ideal.&lt;/p&gt;
&lt;p&gt;Since I was now happy with my "new" CV, I decided to use that as base
concept for a new website. The website didn't have to look great, it
just had to look decent enough, be simple, and most importantly it
should be care free.&lt;/p&gt;
&lt;/section&gt;&lt;section id="care-free"&gt;&lt;h2&gt;&lt;span&gt;Care free&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Because of my history maintaining my own website, I wanted my new
website to be simple and to not require any maintenance other than
adding content (just in case I want to do that). However, I still wanted
to host it myself, so I don't have to trust others to handle things
right.&lt;/p&gt;
&lt;p&gt;This had me thinking for a bit.&lt;/p&gt;
&lt;p&gt;It ruled out in advance any third party services or using something
experimental, requiring regular security updates or something that could
be unstable otherwise. It basically meant I could not use most pieces
of website creation/hosting software out there.&lt;/p&gt;
&lt;p&gt;I concluded that what I needed was a static website. Luckily having a
static website doesn't mean it can't be generated by something less
static, and there happens to be a decent amount of software out there to
choose from.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="static-websites"&gt;&lt;span&gt;Static websites&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Most websites nowadays are generated on the fly by a dynamic system: a
web request comes in, data is fetched from a database, passed through
some layers and in the end HTML comes out.&lt;/p&gt;
&lt;p&gt;Static websites, however, have their HTML stored in files in advance,
and the only thing that has to be done for a web request is to serve
that pre-created HTML file.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;A static website would provide and easy and efficient website, without
needing anything special that could potentially break. As long as the
web server works, the website works, which is great since I have other
reasons to adminsiter and maintain my servers anyway, so it's basically
zero effort.&lt;/p&gt;
&lt;p&gt;All I needed to do now was to find static website generating software
that suits my needs and wishes for flexibility.&lt;/p&gt;
&lt;/section&gt;&lt;section id="pelican"&gt;&lt;h2&gt;&lt;span&gt;Pelican&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;After searching and comparing, I settled for a Python based static
website generator called &lt;a href="https://getpelican.com/"&gt;Pelican&lt;/a&gt;. It seems rather stable and
decently organised, it's very extensible and is relatively easy to use
and configure.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="pelican_1"&gt;&lt;span&gt;Pelican&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://getpelican.com/"&gt;Pelican&lt;/a&gt; is a static website generator, written in Python, that
requires no database or server-side logic. Some of the features include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write your content in reStructuredText, Markdown, or AsciiDoc formats,&lt;/li&gt;
&lt;li&gt;completely static output that is easy to host anywhere,&lt;/li&gt;
&lt;li&gt;themes that can be customized via Jinja templates,&lt;/li&gt;
&lt;li&gt;publish content in multiple languages,&lt;/li&gt;
&lt;li&gt;atom/RSS feeds,&lt;/li&gt;
&lt;li&gt;code syntax highlighting,&lt;/li&gt;
&lt;li&gt;import from WordPress, Dotclear, RSS feeds, and other services,&lt;/li&gt;
&lt;li&gt;modular plugin system and corresponding plugin repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Documentation is available on &lt;a href="https://docs.getpelican.com"&gt;docs.getpelican.com&lt;/a&gt;.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;The way it implements multiple languages for pages and articles works
pretty nicely and is flexible enough to fit in templates the way I like
it, which is important because I want my website to have its content
both in English and Dutch.&lt;/p&gt;
&lt;section id="installation"&gt;&lt;h3&gt;&lt;span&gt;Installation&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;My web server has Python 2.7 installed with PIP 1.5.6, the versions
available in Debian Jessie. Installing the &lt;code&gt;python-pip&lt;/code&gt; package does the
trick if it isn't installed yet.&lt;/p&gt;
&lt;p&gt;To get started with Pelican I created a virtualenv and then installed
the necessary Python packages:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python -m virtualenv ~/website/env
. ~/website/env/bin/activate

pip install pelican Markdown
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The in Debian Jessie available version of PIP does show two compilation
errors when installing, while newer versions of PIP silence them. The
errors are not important and won't affect you.&lt;/p&gt;
&lt;p&gt;The situation here is that Jinja2 has some optional features that use
syntax only valid in Python 3.5+, because all files are precompiled
during installation, the files containing these features
(&lt;code&gt;asyncsupport.py&lt;/code&gt; and &lt;code&gt;asyncfilters.py&lt;/code&gt;) generate errors.&lt;/p&gt;
&lt;/section&gt;&lt;section id="generating-the-website"&gt;&lt;h3&gt;&lt;span&gt;Generating the website&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;I set up the website in &lt;code&gt;~/website/srv&lt;/code&gt; (more about the configuration
below). When the configuration is done and content is available,
generating the website is nothing more than calling &lt;code&gt;pelican&lt;/code&gt; from
inside the virtualenv.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;. ~/website/env/bin/activate
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/website/srv
pelican
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;However, since I don't want to have to remember to activate the
virtualenv and since I like to be able to generate the website from any
directory I happen to be working in, I set up a simple &lt;code&gt;run&lt;/code&gt; script.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/home/tim/website/env/bin/python&lt;/span&gt;
&lt;span class="c1"&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pelican&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vm"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;directory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;realpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vm"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;directory&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getcwd&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;pelican&amp;#39;&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pelican&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To generate the website, I can now just call:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;~/website/srv/run
&lt;/pre&gt;&lt;/div&gt;


&lt;/section&gt;&lt;section id="configuration"&gt;&lt;h3&gt;&lt;span&gt;Configuration&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;After the installation, the initial configuration is very easily done
with &lt;code&gt;pelican-quickstart&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir ~/website/srv
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/website/srv

pelican-quickstart
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I answered "no" to questions about extra scripts, and was left with the
following files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;content&lt;/code&gt; &lt;em&gt;(directory)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;output&lt;/code&gt; &lt;em&gt;(directory)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pelicanconf.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;publishconf.py&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I did not see a reason for a separate publish configuration in my case,
so I added the settings from &lt;code&gt;publishconf.py&lt;/code&gt; to &lt;code&gt;pelicanconf.py&lt;/code&gt; and
got rid of the former.&lt;/p&gt;
&lt;p&gt;The documentation about the configuration is extensive and very good and
teh configuration is rather logical by itself. You can find my
&lt;a href="https://github.com/timwienk/website/blob/master/pelicanconf.py"&gt;configuration on Github&lt;/a&gt;, but I'll go into details about it here as
well (mostly in case I do end up needing a reminder myself - but perhaps
it helps someone else as well).&lt;/p&gt;
&lt;p&gt;To start off I created a &lt;code&gt;plugins&lt;/code&gt; directory in addition to the existing
directories and set the following base settings:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;AUTHOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Tim Wienk&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;SITENAME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Tim.Wienk.name&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;SITEURL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://tim.wienk.name&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;RELATIVE_URLS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;

&lt;span class="n"&gt;PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;content&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;PLUGIN_PATHS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;plugins&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;OUTPUT_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;output/&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DELETE_OUTPUT_DIRECTORY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;

&lt;span class="n"&gt;TIMEZONE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Europe/Amsterdam&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DEFAULT_LANG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DEFAULT_DATE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;fs&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DEFAULT_DATE_FORMAT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;%Y-%m-&lt;/span&gt;&lt;span class="si"&gt;%d&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I wanted the website to be in both English and Dutch and I decided that
I did not care for a lot of Pelican's default pages.&lt;/p&gt;
&lt;p&gt;It seemed most logical to me to just separate the website in an &lt;code&gt;en&lt;/code&gt; and
an &lt;code&gt;nl&lt;/code&gt; section, have all pages as Markdown files in their respective
section directories, and I wanted a place to store "private" data for
use with potential plugins.&lt;/p&gt;
&lt;p&gt;I also figured it would be easiest to have all pages (and articles)
saved as &lt;code&gt;index.html&lt;/code&gt; files in their own output directories. If I wanted
to, I could then easily rewrite paths in the web server configuration
later to strip the &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/index.html&lt;/code&gt; suffixes.&lt;/p&gt;
&lt;p&gt;To achieve these things, I added the following configuration:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;PAGE_PATHS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;nl&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;ARTICLE_PATHS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;en/articles&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;nl/articles&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;STATIC_PATHS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;STATIC_EXCLUDES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;data&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;ARTICLE_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/articles/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;ARTICLE_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/articles/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;/index.html&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;ARTICLE_LANG_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ARTICLE_URL&lt;/span&gt;
&lt;span class="n"&gt;ARTICLE_LANG_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ARTICLE_SAVE_AS&lt;/span&gt;
&lt;span class="n"&gt;DRAFT_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/articles/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;/draft.html&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DRAFT_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/articles/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;/draft.html&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;DRAFT_LANG_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DRAFT_URL&lt;/span&gt;
&lt;span class="n"&gt;DRAFT_LANG_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DRAFT_SAVE_AS&lt;/span&gt;
&lt;span class="n"&gt;PAGE_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;PAGE_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{lang}&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{slug}&lt;/span&gt;&lt;span class="s1"&gt;/index.html&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;PAGE_LANG_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PAGE_URL&lt;/span&gt;
&lt;span class="n"&gt;PAGE_LANG_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PAGE_SAVE_AS&lt;/span&gt;
&lt;span class="n"&gt;ARCHIVES_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;AUTHOR_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;INDEX_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;AUTHORS_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;CATEGORY_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;CATEGORIES_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;TAG_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;TAGS_SAVE_AS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, I did not want to have to have to configure more per-page data
than necessary, but I did want full control over it.&lt;/p&gt;
&lt;p&gt;I disabled some options for categories and I hoped to be able to fetch
all relevant data from the path using the &lt;code&gt;PATH_METADATA&lt;/code&gt; setting. Of
course not everything turned out to be available this way, so there is
some extra metadata configured, too.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;USE_FOLDER_AS_CATEGORY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;
&lt;span class="n"&gt;DISPLAY_CATEGORIES_ON_MENU&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;
&lt;span class="n"&gt;DEFAULT_PAGINATION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;
&lt;span class="n"&gt;DEFAULT_CATEGORY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;article&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;SLUG_SUBSTITUTIONS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;amp;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;and&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;PATH_METADATA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;(?P&amp;lt;lang&amp;gt;[a-z]&lt;/span&gt;&lt;span class="si"&gt;{2}&lt;/span&gt;&lt;span class="s1"&gt;)/(?:articles/(?P&amp;lt;date&amp;gt;\d&lt;/span&gt;&lt;span class="si"&gt;{4}&lt;/span&gt;&lt;span class="s1"&gt;\d&lt;/span&gt;&lt;span class="si"&gt;{2}&lt;/span&gt;&lt;span class="s1"&gt;\d&lt;/span&gt;&lt;span class="si"&gt;{2}&lt;/span&gt;&lt;span class="s1"&gt;)\.)?(?P&amp;lt;slug&amp;gt;.*)\.[a-z]{1,4}&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;EXTRA_PATH_METADATA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/index.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;en/index.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;url&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;nl/index.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;nl/index.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;url&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;nl&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/400.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/400.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/401.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/401.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/403.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/403.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/404.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/404.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/410.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/410.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;en/error/500.md&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;save_as&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;error/500.html&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hidden&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Obviously, all of this just working would have been too easy. I ran into
a problem where Pelican would error when generating pages without a date
in the path, even though it's an optional item in the regular
expression.&lt;/p&gt;
&lt;p&gt;To work around this problem, I monkey patched the relevant function in
the &lt;code&gt;run&lt;/code&gt; script I created to wrap the website generation. (&lt;strong&gt;Edit&lt;/strong&gt; - I
recently &lt;a href="https://github.com/getpelican/pelican/pull/2117"&gt;submitted this patch&lt;/a&gt; to the Pelican project as well.)&lt;/p&gt;
&lt;aside&gt;
&lt;h4 id="monkey-patching"&gt;&lt;span&gt;Monkey patching&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Monkey patching refers to the act of modifying third party code
(generally part of a class or module) to work around a specific issue
locally.&lt;/p&gt;
&lt;p&gt;This can often lead to problems when updating software, so caution is
advised when making these kinds of local changes.&lt;/p&gt;
&lt;/aside&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pelican&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse_path_metadata&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;basename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;splitext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;basename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;subdir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;basename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;checks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;FILENAME_METADATA&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;PATH_METADATA&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;source_path&lt;/span&gt;&lt;span class="p"&gt;)]:&lt;/span&gt;
            &lt;span class="n"&gt;checks&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;USE_FOLDER_AS_CATEGORY&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;checks&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;(?P&amp;lt;category&amp;gt;.*)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subdir&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;regexp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;checks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;regexp&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;regexp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="c1"&gt;# .items() for py3k compat.&lt;/span&gt;
                    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;groupdict&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
                        &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;# metadata must be lowercase&lt;/span&gt;
                        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;metadata&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                                &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                            &lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;metadata&lt;/span&gt;

&lt;span class="n"&gt;pelican&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;readers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse_path_metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parse_path_metadata&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;With the basics working, I went through the (pretty extensive)
collection of plugins. I added "neighbors," for next/previous article
functionality, and "touch", so files have a relevant modified date
(useful for browser caches). I created my own theme, creatively named
"theme" and set some Markdown, Jinja2, feed and sitemap settings.&lt;/p&gt;
&lt;p&gt;For sitemap generation, the projects page and support for HTML sections
I did some more specific work:&lt;/p&gt;
&lt;section id="sitemap"&gt;&lt;h4&gt;&lt;span&gt;Sitemap&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;To generate a sitemap, I took the "sitemap" plugin and changed a few
things to add more differentiation for the reported change frequencies
and priorities based on the type of page or file.&lt;/p&gt;
&lt;/section&gt;&lt;section id="github-contributions"&gt;&lt;h4&gt;&lt;span&gt;Github contributions&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;An additional feature I wanted, to make the "projects" page look a bit
more interesting, was a list of actual Github project contributions,
rather than just a list of projects or a projects' activity. For this I
created a simple "githubcontributions" plugin, which fetches (and
caches) the relevant data.&lt;/p&gt;
&lt;p&gt;The reason for the cache is that I ran into a situation with inactive
repositories, where the first call won't return any data and a next call
would have to wait a few seconds, making fetching data for all projects
is really slow, which in turn makes generating the website really slow.&lt;/p&gt;
&lt;/section&gt;&lt;section id="html-sections"&gt;&lt;h4&gt;&lt;span&gt;HTML sections&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;I created a simple &lt;a href="https://github.com/timwienk/website/blob/master/plugins/markdown_customsection/__init__.py"&gt;"customsection" extension&lt;/a&gt; for Markdown, loosely
based on an existing "sections" extension, to wrap content in sections
and do some heading renumbering.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;PLUGINS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;neighbors&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;githubcontributions&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;touch&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;sitemap&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;theme&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;THEME_STATIC_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;MARKDOWN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;extensions&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;extra&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;headerid&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;meta&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;plugins.markdown_customsection&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;extension_configs&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s1"&gt;&amp;#39;codehilite&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s1"&gt;&amp;#39;linenums&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s1"&gt;&amp;#39;guess_lang&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s1"&gt;&amp;#39;css_class&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;code&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;output_format&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xhtml5&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;JINJA_ENVIRONMENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;extensions&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;jinja2.ext.i18n&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;FEED_ALL_ATOM&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;atom.xml&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;CATEGORY_FEED_ATOM&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="n"&gt;AUTHOR_FEED_ATOM&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="n"&gt;AUTHOR_FEED_RSS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="n"&gt;TRANSLATION_FEED_ATOM&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s1"&gt;/atom.xml&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;SITEMAP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;format&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xml&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;extra_files&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;media/cv/timwienk-cv-nederlands.pdf&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;media/cv/timwienk-cv-english.pdf&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;All that remains is some other configuration that is either used by
plugins or in the theme templates. For completeness:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;

&lt;span class="n"&gt;SOCIAL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;GitHub&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://github.com/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LinkedIn&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://www.linkedin.com/in/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/in/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Twitter&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://twitter.com/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;@timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Facebook&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://www.facebook.com/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Google+&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://plus.google.com/+TimWienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;+timwienk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;GITHUB_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;timwienk&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;FACEBOOK_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;timwienk&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;TWITTER_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;timwienk&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;FIRST_YEAR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1989&lt;/span&gt;
&lt;span class="n"&gt;LAST_YEAR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt;

&lt;span class="n"&gt;GOOGLE_ANALYTICS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;UA-7267499-1&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;GOOGLE_ANALYTICS_ID_SCRIPT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;/scripts/id&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;/section&gt;&lt;/section&gt;&lt;section id="theme"&gt;&lt;h3&gt;&lt;span&gt;Theme&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Pelican themes consist of a collection of static files and Jinja2
templates. I found it very easy to set up, and since you can set
specific templates for specific pages, it's easy to incorporate
differences for "special" pages using the template &lt;code&gt;extends&lt;/code&gt; and &lt;code&gt;block&lt;/code&gt;
features.&lt;/p&gt;
&lt;p&gt;I decided against adding things like gettext to actually organise
translations properly, since my website is rather small I don't expect
to add more languages or translatable fixed text. Perhaps I will add
that in the future, but for now just doing language dependent things in
the template will do.&lt;/p&gt;
&lt;p&gt;I don't think it helps to go in-depth about the theme, you can find the
&lt;a href="https://github.com/timwienk/website/tree/master/theme"&gt;theme on Github&lt;/a&gt; if you're interested in the details.&lt;/p&gt;
&lt;/section&gt;&lt;/section&gt;&lt;section id="apache-http-server"&gt;&lt;h2&gt;&lt;span&gt;Apache HTTP Server&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;To serve my website I stuck with the Apache HTTP Server. Even though I
do like Nginx's approach and it's proven itself very fast and efficient,
I didn't think these aspects were very important in my case, and since I
already had the Apache HTTP Server running on my webserver for other
projects, the choice wasn't very hard.&lt;/p&gt;
&lt;p&gt;Most of the required configuration was just setting up a VirtualHost
with the correct settings:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*:443&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;ServerName&lt;/span&gt; tim.wienk.name
    &lt;span class="nb"&gt;ServerAdmin&lt;/span&gt; webmaster@localhost

    &lt;span class="nb"&gt;DocumentRoot&lt;/span&gt; &lt;span class="sx"&gt;/srv/www/tim.wienk.name/http&lt;/span&gt;

    &lt;span class="nb"&gt;ErrorLog&lt;/span&gt;  ${APACHE_LOG_DIR}/error.log
    &lt;span class="nb"&gt;CustomLog&lt;/span&gt; ${APACHE_LOG_DIR}/access.log combined

    &lt;span class="nb"&gt;SSLEngine&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt;
    &lt;span class="nb"&gt;SSLHonorCipherOrder&lt;/span&gt;   &lt;span class="k"&gt;on&lt;/span&gt;
    &lt;span class="nb"&gt;SSLUseStapling&lt;/span&gt;        &lt;span class="k"&gt;on&lt;/span&gt;
    &lt;span class="nb"&gt;SSLCertificateFile&lt;/span&gt;    &lt;span class="sx"&gt;/srv/acme/certs/tim.wienk.name.crt&lt;/span&gt;
    &lt;span class="nb"&gt;SSLCertificateKeyFile&lt;/span&gt; &lt;span class="sx"&gt;/srv/acme/private/tim.wienk.name.key&lt;/span&gt;
    &lt;span class="nb"&gt;BrowserMatch&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;MSIE [2-6]&amp;quot;&lt;/span&gt; nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    &lt;span class="nb"&gt;BrowserMatch&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;MSIE [17-9]&amp;quot;&lt;/span&gt; ssl-unclean-shutdown
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I generally try to store data in their FHS defined locations, it keeps
everything clear and interoperable. That being said, in this case
&lt;code&gt;/srv/www/tim.wienk.name/http&lt;/code&gt; is a symbolic link to
&lt;code&gt;/home/tim/website/srv/output&lt;/code&gt; to keep things in my home directory.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="filesystem-hierarchy-standard"&gt;&lt;span&gt;Filesystem Hierarchy Standard&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The defined directory structure for Unix-like operating systems. It
provides separation based on the purpose of the stored data, making it
easier to manage and predict the security of data and making it easier
to decide on filesystem separation.&lt;/p&gt;
&lt;p&gt;As an example, the &lt;code&gt;/srv&lt;/code&gt; filesystem is meant to be used for data for
services provided by the system.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;For SSL I opted to use the Let's Encrypt ACME setup, although I do have
the certificate management separated from the webserver as much as
possible.&lt;/p&gt;
&lt;aside&gt;
&lt;h3 id="automatic-certificate-management-environment"&gt;&lt;span&gt;Automatic Certificate Management Environment&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;ACME is a protocol to help automate the request, authentication and
provision of (free) SSL certificates, designed as part of the "HTTPS
everywhere" initiatives. As far as I know it's currently only in use by
its designer &lt;a href="https://letsencrypt.org/"&gt;Let's Encrypt&lt;/a&gt;.&lt;/p&gt;
&lt;/aside&gt;
&lt;p&gt;As part of the Pelican setup I generated a bunch of simple error
documents, I configured those here as well:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt; &lt;span class="sx"&gt;/error/400.html&lt;/span&gt;
    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;401&lt;/span&gt; &lt;span class="sx"&gt;/error/401.html&lt;/span&gt;
    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;403&lt;/span&gt; &lt;span class="sx"&gt;/error/403.html&lt;/span&gt;
    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;404&lt;/span&gt; &lt;span class="sx"&gt;/error/404.html&lt;/span&gt;
    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;410&lt;/span&gt; &lt;span class="sx"&gt;/error/410.html&lt;/span&gt;
    &lt;span class="nb"&gt;ErrorDocument&lt;/span&gt; &lt;span class="m"&gt;500&lt;/span&gt; &lt;span class="sx"&gt;/error/500.html&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next I also wanted to add some extra headers for good measure:
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options"&gt;X-Content-Type-Options&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options"&gt;X-Frame-Options&lt;/a&gt; for all pages, and a
&lt;code&gt;Link&lt;/code&gt; header to the "home page" to explain non-human visitors what's
going on:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="nt"&gt;&amp;lt;IfModule&lt;/span&gt; &lt;span class="s"&gt;mod_headers.c&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always set Link &lt;span class="s2"&gt;&amp;quot;&amp;lt;https://tim.wienk.name/&amp;gt;; rel=canonical; hreflang=x-default&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;expr=%{REQUEST_URI}==&amp;#39;/&amp;#39;&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always append Link &lt;span class="s2"&gt;&amp;quot;&amp;lt;https://tim.wienk.name/&amp;gt;; rel=alternate; hreflang=x-default&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;expr=%{REQUEST_URI}==&amp;#39;/&amp;#39;&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always append Link &lt;span class="s2"&gt;&amp;quot;&amp;lt;https://tim.wienk.name/en&amp;gt;; rel=alternate; hreflang=en&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;expr=%{REQUEST_URI}==&amp;#39;/&amp;#39;&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always append Link &lt;span class="s2"&gt;&amp;quot;&amp;lt;https://tim.wienk.name/nl&amp;gt;; rel=alternate; hreflang=nl&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;expr=%{REQUEST_URI}==&amp;#39;/&amp;#39;&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always set X-XSS-Protection &lt;span class="s2"&gt;&amp;quot;1; mode=block&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always set X-Content-Type-Options &lt;span class="s2"&gt;&amp;quot;nosniff&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;Header&lt;/span&gt; always set X-Frame-Options &lt;span class="s2"&gt;&amp;quot;DENY&amp;quot;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/IfModule&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And lastly I added rewrite rules so all pages are accessible without &lt;code&gt;/&lt;/code&gt;
or &lt;code&gt;/index.html&lt;/code&gt; suffix, with a special condition based on the
&lt;code&gt;Accept-Language&lt;/code&gt; header for the home page and a few extra redirects in
case people try to access content without language prefix:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="nb"&gt;RewriteEngine&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt;

    &lt;span class="nb"&gt;RewriteCond&lt;/span&gt; %{HTTP:Accept-Language} ^nl [NC]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/?$                       &lt;span class="sx"&gt;/nl&lt;/span&gt;             [R=302,QSA,L]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/?$                       &lt;span class="sx"&gt;/en&lt;/span&gt;             [R=302,QSA,L]

    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/about/?$                 &lt;span class="sx"&gt;/en/about&lt;/span&gt;       [R=301,QSA,L]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/articles/?$              &lt;span class="sx"&gt;/en/articles&lt;/span&gt;    [R=301,QSA,L]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/contact/?$               &lt;span class="sx"&gt;/en/contact&lt;/span&gt;     [R=301,QSA,L]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/cv/?$                    &lt;span class="sx"&gt;/en/cv&lt;/span&gt;          [R=301,QSA,L]
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/projects/?$              &lt;span class="sx"&gt;/en/projects&lt;/span&gt;    [R=301,QSA,L]

    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/(.*)/(index.html)?$      /$1             [R=301,QSA,L]

    &lt;span class="nb"&gt;RewriteCond&lt;/span&gt; &lt;span class="sx"&gt;/srv/www/tim.wienk.name/http/&lt;/span&gt;%{REQUEST_URI}/index.html -f
    &lt;span class="nb"&gt;RewriteRule&lt;/span&gt; ^/(.*)$                    /$1/index.html  [QSA,L]
&lt;span class="nt"&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The end result is what you see now, a working, simple website. There
still isn't a lot of content, but perhaps that will come in the future,
at least I now have the option without having to worry about the website
itself too much.&lt;/p&gt;
&lt;/section&gt;</content><category term="article"></category></entry></feed>