CenterForOpenScience/osc

make it possible to stand up the blog locally

Opened this issue · 14 comments

Add the pelican files to the repo so that design and technical contributors can work on the blog. by which I mean, the pelicanconf.py, publishconf.py, fab or make file, requirements.txt and anything else required to be able to stand up the blog locally so that we can test our changes.

  • make it possible to stand up the blog locally using the same method that is used in production
  • readify the process

I don't use those to create the blog, so feel free to add them. I did add a simple build script that I use.

Thanks. I might add them later because the devserver mode is helpful.

What do I need to do to run a local version beyond installing pelican and running build.py?

I don't know the answer to this. Jeff needs to document it (see #3). I deploy my pelican blog in an entirely different way and can't help.

pip install -r requirements.txt
python build.py

open output/index.html in a browser.

I think there's a relative url setting that can be used to make sure css/js
show up nicely. I'll have to check on that later.

Jeff.

On Wed, Oct 2, 2013 at 6:06 PM, codersquid notifications@github.com wrote:

I don't know the answer to this. Jeff needs to document it (see #3#3).
I deploy my pelican blog in an entirely different way and can't help.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-25581217
.

Thanks. I think I'm almost there, but output/index.html is not populated by posts.

Okay, got help from someone else to get up and running. Let's README-ify all this soon.

Before I would consider this done, I agree that a readme should exist, and I also would like for contributors to be able to have a development environment that is as close to production as possible.

When people want to enhance or fix the site, they need to be able to test their changes in an environment that mimics production as closely as possible.

Hey Jeff, can you look into the relative URL setting to display css/js? That's all we need to close this issue.

Does changing site_url not solve the problem? Some templates don't handle relative URLs nicely. If that's the issue, then let's fire off another issue to change the template to handle them.

Themes are working for me, but not images, and additionally it's difficult to navigate around the local site without accidentally going to the live site, because generated links are to osc.centerforopenscience.org.

Changing siteurl seems to break the theme without fixing any of the other two problems, although possibly I'm changing it to the wrong thing. What would you change it to?

I think the theme requires changes then. I use a server that my IDE (pycharm) puts the site behind.

Okay, I'm going to re-open this and look into changing the theme later.

You could also open an issue on the template's repo; that would be where the contribution should go, and then we can merge it with our own changes to the template.