Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure everything to use django-amber #2

Closed
wants to merge 6 commits into from

Conversation

@inglesp
Copy link

inglesp commented Jul 16, 2016

This PR restructures everything to make use of my Django Amber, my new static site generator.

The page content is now in pythonineducation/data/page/, and the filenames are things like en-microbit.md (the English version of the micro:bit page).

The templates are in pythonineducation/templates/pythonineducation/.

The static content is in pythonineducation/static/.

Working on this has revealed a handful of shortcomings in Django Amber, including:

  1. No CNAME is generated when the site is built
  2. The django database needs to be populated manually before ./manage.py serve is run

I'll fix these tomorrow.

@ntoll Let me know if this approach looks sensible!

ntoll added 2 commits Jul 27, 2016
@ntoll
Copy link
Collaborator

ntoll commented Jul 27, 2016

Hi Peter,

Just been quickly looking through this and it looks promising. Can we preserve the directory structure for internationalisation? It's all going to get very messy and difficult to organise if not.

Also, some of the content pages, because of their complexity, will be written in HTML. I guess this can be made to work?

N.

@inglesp
Copy link
Author

inglesp commented Jul 27, 2016

Preserving the directory structure will require a little bit of work on Django Amber -- as it is, the location of files is hardcoded, so we'll need to provide a hook to customise this.

Writing pages in HTML will be easy.

What's the timeframe for this?

@ntoll
Copy link
Collaborator

ntoll commented Jul 27, 2016

Sooner rather than later. It needs to be in place before I ask for collaborators for internationalisation since we need the scaffolding in place for people to use.

What I like about django-amber is that I can add funky custom things to manage.py.

Right now, my main focus is to get the amazing designs from Steve online along with initial content, the online editor and tutorials. I can do this while work is done with amber but sometime mid-August (basically, when I get back from holiday) I'll want to get support from people as described above.

Does this make sense? Perhaps we can chat about this tomorrow on IRC? (I have parental duties to fulfil right now - dad taxi pick up in 25 mins.)

@inglesp
Copy link
Author

inglesp commented Jul 27, 2016

OK, I've done some exploratory fiddling, and I can get this done tomorrow :)

ntoll added 2 commits Jul 28, 2016
@inglesp
Copy link
Author

inglesp commented Jul 28, 2016

Hi @ntoll -- I've addressed your two points, although I haven't yet updated the README, and I've also got it to produce a CNAME file.

@ntoll
Copy link
Collaborator

ntoll commented Jul 29, 2016

Please rebase with master. I've just tried but cocked it up. I get a large splurge of stack trace complaining about "Page has no field named 'url'" (when all the content pages do have a YAML url field. :-/ It doesn't tell me which content page it thinks is at fault. I suspect I've rebased incorrectly since a bunch of stuff in master never made it to the branch. :-(

I have kept the same directory structure for content, templates, and
media.
@inglesp inglesp force-pushed the inglesp:amber branch from 5498b01 to f7cb614 Jul 29, 2016
@inglesp
Copy link
Author

inglesp commented Jul 29, 2016

I'm closing this in favour of #3, since this PR wanted to be merged into an old branch.

@inglesp inglesp closed this Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.