Message Boards Message Boards

Making a Blog in 30 Minutes from Mathematica Notebooks

Posted 5 years ago

Another fun cross post for anyone who's wanted a Mathematica blog before


Making a Blog in 30 Minutes

Today I'm going to have a bit of fun showing off a polished up project of mine. We're going to make a full-fledged Mathematica blog in under 30 minutes using a package of mine called Ems . Let's get the clock started!

$start = Now

(*Out:*)

post20-143897372696997121

The first thing we'll need to do is get the package installed. Happily this is easy as I put it on my paclet server, it's just a single line of code:

PacletInstall["Ems",
  "Site"->"http://www.wolframcloud.com/objects/b3m2a1.paclets/PacletServer"
  ]

(*Out:*)

post20-6044376379303271593

This has installed Ems for us so now we just need to open up the Ems Assistant palette that was installed for us:

post20-3018764253048518340

This opens up a helpful palette that will be our primary point of contact to the package.

The first thing we'll do is create a new site but clicking on post20-1706016611082382042 down at the bottom of the palette. This opens a little window for us:

post20-8612153873720446237

Let's call our site "home" . When we do that we'll see the site picker at the top of the palette get set to "home" .

post20-3971340583569845046

Next we'll get our site configured, so we'll click on post20-1272344427469810573 in the second panel of buttons. It'll pop open the SiteConfig.wl file where we'll make most of our changes:

post20-1794282584951826230

We see a bunch of options, but we'll just change a few things. The theme setting "bootstap-blog" provides a bunch of config options that we'll ignore. The big thing we'll change is the "SiteName" and the "SiteURL" . Before we do this, though, we'll need to decide on a deployment location. For the sake of argument, let's say my name is Steve Wolfraum. First I'll register steve.wolfraum@gmail.com:

post20-2073302413032380876

Next I'll setup a Wolfram Cloud account with this GMail so we can deploy there:

post20-3093181126200354721

These configuration things took us ~15 minutes:

$midway = Now
$midway - $start

(*Out:*)

post20-7580949778323143944

(*Out:*)

14.4225min

Now we go back to our config and put in our "SiteURL" , which will just be our cloud base + "home" and we will also add a "SiteName" , which for convenience we'll say is "Steve Wolfraum" . Finally, for deployment we'll add our $WolframID to the CloudConnect option so that the system will know to connect there before deployment. Finally, there's a bug in the current "NeuralNetworks`" paclet that causes it to fail to find the default "SummaryLength" (which is one paragraph) so we'll convert that to one line instead.

After all this our config looks like:

post20-6413911531400461128

Now we just need to add some content! The "blog" template that we initialized off of has some template content for us, so we'll just build off of that. The first thing is to change the About page which we'll find is in the Open Page menu. This opens the notebook and we'll just add some personalized content:

post20-1596109516291035206

We'll do the same for the first of the template posts:

post20-6114702035088562840

Now we just call "Build Pages" in the palette (I prefer to turn off "Silent" but that's up to you). This will open a page that looks bad for now, but will look right once it's deployed:

post20-7477456888420053168

Now we'll actually deploy this using the "Deploy Site" button. All the content will get copied up to the cloud directory starting with the site folder name we gave at the very beginning ( "home" ). This is also the URL we provided as the "SiteURL" but the two don't necessarily have to be the same. The latter is only used to locate resources and things of that nature.

After the deployment is done the page will open and we'll see our brand new site:

post20-8398158422932287388

And checking our timing:

$stop = Now
$stop - $start

(*Out:*)

post20-3076418382623228239

(*Out:*)

29.718min

And we just barely snuck under the bar.

POSTED BY: b3m2a1 ​ 
3 Replies

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming! We made slight title correction as you use both desktop and cloud pipelines.

POSTED BY: Moderation Team
Posted 5 years ago

This is really cool! Could you clarify how my CloudCredits are affected?

I’m assuming that cloudcredits are only impacted by CloudCDF blogposts, but that the size of the website does contribute to the size limits on my wolfram cloud account?

POSTED BY: Martin Hadley
Posted 5 years ago

It does contribute to the size, but all the files are so small that it'll barely make a dent as far as I can tell. That is, I've never hit an issue with going over the cloud account data size because of it.

POSTED BY: b3m2a1 ​ 
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract