Basic help updating old site?

12 views
Skip to first unread message

L. Amber O'Hearn

unread,
Aug 27, 2022, 6:54:47 PM8/27/22
to nikola-discuss
Hi all,

About 8 years ago I moved a wordpress blog to nikola via GitHub. I was very happy with it! The site is https://www.subsymbol.org/ and it's hosted here: https://github.com/ambimorph/subsymbol.org

Early last year, after many years not using it, I tried to add a post, and I broke many things!

After updating the software and several aspects of conf.py, I eventually was able to add a new post, but I never did get my previous indexes working. I ran out of allotted time for the project, and am only returning to it now.

Now I can't even seem to add a post. The process I thought I was supposed to follow was to add a new post with `nikola new_post`, commit that post to master, and then run `nikola github_deploy` which updates gh-pages. But when I do this, the site just completely breaks.

Any advice appreciated!
Amber

Blaise Pabon

unread,
Aug 28, 2022, 12:16:15 PM8/28/22
to nikola-...@googlegroups.com
Hi Amber,

I'm new to Nikola, but I have some experience troubleshooting python.
It would help to have a example of the error your getting, because it from looking at the deployment log: https://github.com/ambimorph/subsymbol.org/actions/runs/2940932964

things look fine.

It's super important that you run your build using the latest version of nikola because there was a recent issue with a markdown extension that produced a confusing build error.

If you like, you can paste a copy of relevant error messages into the paste bin at https://paste.opendev.org/ 
and share the link.

HTH,
Blaise

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/82e74917-f3a6-4e5d-906e-310836c13d1fn%40googlegroups.com.


--
LinkedIn  |  Quora  |  Github
“If you want to go fast, go alone. If you want to go far, go together.” --African proverb 

L. Amber O'Hearn

unread,
Aug 28, 2022, 7:00:04 PM8/28/22
to nikola-...@googlegroups.com
Hi, Blaise,

Thank you for looking!

The reason it looked fine was because I had rolled back the git repo with a hard reset. I now updated nikola to the latest version, but the result is the same: I get no error on deployment -- it says successful! -- but the site goes down and gives a 404.

I don't really know what to do from here except maybe try to rebuild the site from scratch and re-import the old html files etc.

Do you have any other ideas? I'm leaving it broken in the hopes you will take another look. :-)

Cheers,
Amber

You received this message because you are subscribed to a topic in the Google Groups "nikola-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nikola-discuss/VQmNwPpyDQE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAJZwnxXWeemWAozQ5xvio15tPcZfz64VzjtQRMqPwt2Yd0NLXw%40mail.gmail.com.

Detlev Zundel

unread,
Aug 30, 2022, 5:28:01 AM8/30/22
to nikola-...@googlegroups.com
Hi Amber,

[...]

> The reason it looked fine was because I had rolled back the git repo with a
> hard reset. I now updated nikola to the latest version, but the result is
> the same: I get no error on deployment -- it says successful! -- but the
> site goes down and gives a 404.
>
> I don't really know what to do from here except maybe try to rebuild the
> site from scratch and re-import the old html files etc.
>
> Do you have any other ideas? I'm leaving it broken in the hopes you will
> take another look. :-)

So I tried cloning your https://github.com/ambimorph/subsymbol.org git
repo and I can build it just fine locally with Nikola 8.2.3. Serving it
locally with "nikola serv" works also fine, so I think the problem must
be somewhere in the Github pages setup. As I do not use GH Pages, I
have no real idea what could be wrong there, but I guess Nikola is not
the problem.

Hope that helps!
Detlev

Detlev Zundel

unread,
Aug 30, 2022, 6:05:27 AM8/30/22
to nikola-...@googlegroups.com
Hi Amber,

[...]

> So I tried cloning your https://github.com/ambimorph/subsymbol.org git
> repo and I can build it just fine locally with Nikola 8.2.3. Serving it
> locally with "nikola serv" works also fine, so I think the problem must
> be somewhere in the Github pages setup. As I do not use GH Pages, I
> have no real idea what could be wrong there, but I guess Nikola is not
> the problem.

Ok, I now understand things a little bit better and it seems that your
problem comes from the fact that files/CNAME is not copied to output/ as
it should. Your gh-pages branch thus also misses the CNAME file in the
root folder and from what I can read in the documentation, this is the
reason your custom DNS does not work.

So checking your conf.py, I see this section:

#+begin_src python
# One or more folders containing files to be copied as-is into the output.
# The format is a dictionary of {source: relative destination}.
# Default is:
# FILES_FOLDERS = {'files': ''}
# Which means copy 'files' into 'output'
FILES_FOLDERS = {'scripts':'scripts'}
#+end_src

This effectively cuts off the 'file/CNAME' file that you have provided
just for gh-pages. if you re-add the 'files' part, it should work again.
I tried with this diff:

#+begin_src diff
diff --git a/conf.py b/conf.py
index 29693a6..5eb58c8 100644
--- a/conf.py
+++ b/conf.py
@@ -293,7 +293,7 @@ TIMEZONE = "America/Denver"
# Default is:
# FILES_FOLDERS = {'files': ''}
# Which means copy 'files' into 'output'
-FILES_FOLDERS = {'scripts':'scripts'}
+FILES_FOLDERS = {'files': '', 'scripts':'scripts'}

# One or more folders containing code listings to be processed and published on
# the site. The format is a dictionary of {source: relative destination}.
#+end_src

and I now see that CNAME again ends up in output/ as it should.

Hope that helps.
Detlev

--
I hear and I forget. I see and I remember. I do and I understand.
-- Confucius

Blaise Pabon

unread,
Aug 30, 2022, 2:07:00 PM8/30/22
to nikola-...@googlegroups.com
ooh, nice catch, Detlev. Thank you!
-Blaise

--
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.

L. Amber O'Hearn

unread,
Aug 30, 2022, 2:28:42 PM8/30/22
to nikola-...@googlegroups.com
Yes! Wonderful. Thank you so much. I don't think I would ever have noticed that.

Much appreciation! 
Amber

You received this message because you are subscribed to a topic in the Google Groups "nikola-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nikola-discuss/VQmNwPpyDQE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAJZwnxXZuATe%2BCjrDsQ99p42jj1rNrLteR0MB6ZhL7nUW-30gw%40mail.gmail.com.

Detlev Zundel

unread,
Aug 30, 2022, 3:03:00 PM8/30/22
to nikola-...@googlegroups.com
Hello Amber,

> Yes! Wonderful. Thank you so much. I don't think I would ever have noticed
> that.

Excellent! I always wondered how GitHub pages work but never came
around to looking into it as I was not planning to use them. I am most
certainly glad to see your site up again. Fixing a real problem I
learned something myself ;)

Best wishes
Detlev

--
In any respectable branch of engineering, failure to observe such
elementary precautions [checking array bounds on every access]
would have long been against the law. -- C.A.R. Hoare

Reply all
Reply to author
Forward
0 new messages