View on GitHub

scriv-git-pages

Writing in Scrivener for GitHub Pages

Regrets, I’ve had a few Top Setting up the project

Testing the Compile

I’ve created a folder, called Testing the Compile, and this document inside it, called Created the folder. In our final compilation, we’ll want the title of the folder to show up and not the title of this document. Now I’ll add one more document, to better test our Sub-Section notion.

This is being written in a second sub-document, called “Another couple of paragraphs”. The Scrivener binder looks like this:

This should be enough to let us see whether our sections are working right. Let’s look at the compile:

Just for grins, this is yet another sub-document, called Looking at compile. Here’s what the compile window looks like now:

Notice that the sub documents in the folder are called Sub-Section, just as we intended. That happened automatically, because of that structure setup we did. You can see that the Section Types are all shown in italic. That means they were automatically defined from structure. We could set them explicitly if we wanted to. But we don’t. I would like to see what the compiled text looks like right now, so I’ll let the compile go through.

I open the compiled markdown file in Sublime, my text editor, and it all looks pretty good, except that in addition to all the pictures showing up in line in the text, as they should, they are all at the bottom of the compiled file as well. It looks like this:

Just for grins, this is yet another sub-document, called Looking at compile. Here’s what the compile window looks like now:

![][ScreenShot2018-06-15at4.55.43AM]

Notice that the sub documents in the folder are called Sub-Section, just as we intended. That happened automatically, because of that structure setup we did. You can see that the Section Types are all shown in italic. That means they were automatically defined from structure. We could set them explicitly if we wanted to. But we don’t. I *would* like to see what the compiled text looks like right now, so I’ll let the compile go through.

[ScreenShot2018-06-15at3.48.45AM]: /scriv-git-pages/ScreenShot2018-06-15at3.48.45AM.png

[ScreenShot2018-06-15at3.56.55AM]: /scriv-git-pages/ScreenShot2018-06-15at3.56.55AM.png

[ScreenShot2018-06-15at3.59.33AM]: /scriv-git-pages/ScreenShot2018-06-15at3.59.33AM.png

[ScreenShot2018-06-15at4.15.13AM]: /scriv-git-pages/ScreenShot2018-06-15at4.15.13AM.png

[ScreenShot2018-06-15at4.31.51AM]: /scriv-git-pages/ScreenShot2018-06-15at4.31.51AM.png

[ScreenShot2018-06-15at4.33.00AM]: /scriv-git-pages/ScreenShot2018-06-15at4.33.00AM.png

[ScreenShot2018-06-15at4.34.19AM]: /scriv-git-pages/ScreenShot2018-06-15at4.34.19AM.png

[ScreenShot2018-06-15at4.35.50AM]: /scriv-git-pages/ScreenShot2018-06-15at4.35.50AM.png

[ScreenShot2018-06-15at4.53.51AM]: /scriv-git-pages/ScreenShot2018-06-15at4.53.51AM.png

[ScreenShot2018-06-15at4.55.43AM]: /scriv-git-pages/ScreenShot2018-06-15at4.55.43AM.png

That last bit, if compiled to HTML from Markdown, would look like a series of links to the PNGs. I’m not at all sure where that came from, but I’m not going to worry about it right now.

No titles have come out as yet. Let’s deal with that just for fun.

To get the titles to come out, we need to do a bit of layout assignment. I think maybe we don’t need to create new layouts yet, we might just be able to tick some options. Let’s try, inside compile:

There’s already a layout defined, Text Section with Heading, that nearly does the job. I notice it’s using H1 (one # sign), but maybe that’s OK. Now the compiled Markdown looks like this:

Title: GitHub-Pages  
Author: Ronald Jeffries

# Initial Notes #

We’re here to create a little “book”, showing how to create the GitHub pages you will be reading when this is all done. This chapter starts at the beginning, though it may not wind up being the first page of the “book”.

I’ve just started with a blank Scrivener project, which I named “GitHub-Pages” and saved in Dropbox/Apps/Scrivener, where my shared Scrivener projects live.

Right now, what I see on the screen looks like this:

![][ScreenShot2018-06-15at3.48.45AM]

I’ve got View > Text Editing > Show invisibles turned on right now. That’s making the paragraph markers and dots for spaces show up. I don’t usually have that on but wanted to talk about the defaults set so far.

I’m going to compile from Scrivener to MultiMarkdown, which is its compile form intended to produce, well, MultiMarkdown, which will be roughly what GitHub expects to make our pages. And although Scrivener lets you format your typing any way you like, and although we may play with that capability later on, I’m used to typing in a sans-serif font (presently Arial) with explicit returns between paragraphs. I’ve got Scrivener’s default formatting set up that way.

# Default Formatting #

You set your initial font and paragraph info in Scrivener > Preferences, (command-comma). My info looks like this:

And so on. I notice it has included Title and Author at the top. There’s a way to turn that off, and I’d like to do that while I’m thinking about it.

Mumble mumble how do we turn that off. I knew that yesterday or the day before …

Ah, yes. In the tags subtab of compile, it lists the metadata. Way down in the lower right, you can delete and add the stuff it includes. It’s basically putting YAML at the top of your compiled document. That’s actually something you might want on another day. Today is not that day. I’ll delete those items now:

And sure enough, they’re gone from the top of the file.

We could actually turn this into a GitHub Pages page right now. Maybe I’ll do that next. Right now, it’s time for a break.

Regrets, I’ve had a few Top Setting up the project