removing posts?

329 views
Skip to first unread message

dataholiks...@gmail.com

unread,
Jun 8, 2015, 2:25:47 PM6/8/15
to nikola-...@googlegroups.com
Hi,

I'm new to nikola. I've been playing with it for a couple of days. I really like it!

I have a blog up and running with github.io using nikola github_deploy

I was wondering if there is a straightforward way of removing files globally, or if it should be done manually? Creating a new posts populates the blog/posts/ directory. Performing 'nikola build' then adds files to blog/output/posts/ (one of which is an html file). If I then remove the post from blog/posts/ and do 'nikola build' again, the files in blog/output/posts/ are still there :/.

Any ideas would be appreciated.

Dataholik.

Chris Warrick

unread,
Jun 8, 2015, 2:29:31 PM6/8/15
to Nikola—Discuss
$ rm blog/posts/foo.rst
$ nikola build
$ nikola check -f

If everything on the list can be deleted (make sure there are no extra orphans):
$ nikola check -f --clean-files

`nikola github_deploy` should handle the delete for you, but I’m not sure…

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

dataholiks...@gmail.com

unread,
Jun 8, 2015, 2:48:51 PM6/8/15
to nikola-...@googlegroups.com
Thanks, I will try this later. Another question I have is regarding 'nikola github_deploy'. My understanding from the docs 'Deploying to Github' page is that this only pushes the output folder to remote 'master' branch. Must the source be pushed to remote 'deploy' branch separately by staging and committing local 'deploy' branch? That is what I am doing right now and it works fine. I just want to make sure that this is the way it's meant to be done. Also, one might get in trouble with this approach if collaborating on a blog with other people (if you just 'nikola github_deploy', then the source files will not be updated in the repo, which means that collaborators might not have the latest version of the source files). Is there anyway to automate this with nikola github_deploy?


Dataholik.

Chris Warrick

unread,
Jun 8, 2015, 3:04:30 PM6/8/15
to Nikola—Discuss
On Mon, Jun 8, 2015 at 8:48 PM, <dataholiks...@gmail.com> wrote:
> Thanks, I will try this later. Another question I have is regarding 'nikola
> github_deploy'. My understanding from the docs 'Deploying to Github' page is
> that this only pushes the output folder to remote 'master' branch. Must the
> source be pushed to remote 'deploy' branch separately by staging and
> committing local 'deploy' branch? That is what I am doing right now and it
> works fine. I just want to make sure that this is the way it's meant to be
> done. Also, one might get in trouble with this approach if collaborating on
> a blog with other people (if you just 'nikola github_deploy', then the
> source files will not be updated in the repo, which means that collaborators
> might not have the latest version of the source files). Is there anyway to
> automate this with nikola github_deploy?

I’m not sure if I understood you correctly, but you should store the
site source in git (usually on a `src` branch) and you must push it
manually. You could use git’s pre-push hooks for automation and use
`git push` as your only command.

Roberto Alsina

unread,
Jun 8, 2015, 3:06:08 PM6/8/15
to nikola-...@googlegroups.com
Or a "nikola deploy" that does "nikola github_deploy && git add whatever && git commit -a -m "updated" && git push"

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dataholiks...@gmail.com

unread,
Jun 8, 2015, 7:16:48 PM6/8/15
to nikola-...@googlegroups.com, ral...@kde.org
Awesome, Exactly what I was looking for!
Thanks.

Dataholik.
Reply all
Reply to author
Forward
0 new messages