- Authors: creating a new blog post
- Editors: editing and publishing a post
- Authors and Editors: updating a published post
- Troubleshooting Asciidoc
- Troubleshooting GitHub workflow
These steps are to be completed by the author of the blog post.
-
Create an issue for the blog post. This is to help the editors track the progress of the post.
-
All blog posts except release blog posts
Create a normal issue. In the description, give a simple outline of the purpose of the blog post. If there is a specific date by which the post must be available, mention that in the description too.
-
GA release blog posts (Open Liberty GA release announcements only)
Create an issue using the
Open Liberty release notes
issue template. Make sure to select each task in the issue as you complete it to show progress. -
Beta release blog posts (Open Liberty beta release announcements only)
Create a normal issue. In the title, make clear that it's for the beta release and which release version.
-
-
Clone the repo and create a branch off the default
prod
branch. From theprod
branch, run:git checkout -b branch_name
, wherebranch_name
is a name you give your new branch.Do all your editing in this branch so that the blog editors can make any necessary edits directly in the branch before publishing your post.
-
Create your blog post using Asciidoc markup (use an editor such as VSCode with the Asciidoc plugin):
-
Blog post (probably what you're doing)
Copy the post-single-author.adoc file (or post-multiple-authors.adoc for multiple authors) to the posts directory and rename the file using the format
YYYY-MM-DD-post-title.adoc
, where the date represents the expected publication date (e.g.2021-11-21-open-liberty-is-awesome.adoc
).Place any images in img/blog.
-
GA release blog post (Open Liberty GA release announcements only)
Copy the ga-release-post.adoc file to the posts directory and rename the file using the format
YYYY-MM-DD-post-title.adoc
, where the date represents the expected publication date and the end of the file name is the release version number without periods (e.g.2021-11-21-open-liberty-is-awesome-210011.adoc
).Place any images in img/blog.
Ensure that the Asciidoc tags (e.g.
// tag::intro[]
and// end::intro[]
) in the template are retained around the relevant parts of the release post. These Asciidoc tags will be used to build alternative versions of the post content. -
Beta release blog post (Open Liberty beta release announcements only)
Copy the beta-release-post.adoc file to the posts directory and rename the file using the format
YYYY-MM-DD-post-title.adoc
, where the date represents the expected publication date and the end of the post title is the beta release version number without periods or hyphens (e.g.2021-11-21-new-awesomeness-coming-soon-210012beta.adoc
).Place any images in img/blog.
-
Third-party blog post (externally hosted posts only)
Copy the third-party-blog-post.adoc file to the posts directory and rename the file using the format
YYYY-MM-DD-post-title.adoc
, where the date represents the expected publication date (e.g.2021-11-21-open-liberty-is-awesome.adoc
).
-
-
If you are not employed by IBM, in at least one of your commits, sign off the commit using the Developer Certificate process.
-
When you have finished the post, check that it renders correctly. If you have a preview function in your editor, use that (eg the Asciidoc plugin in VSCode). Otherwise, you can check that GitHub renders it properly when you push to GitHub in the next step.
-
Push the file to GitHub, then create a pull request (PR) into the
draft
branch.Link the PR to the issue you created in Step 1. Anyone can review/approve the PR before you merge it.
(If you've been working in a fork for some reason, create a feature branch [see Step 2] and push your changes to the feature branch, then create a PR to the
draft
branch from there.)If you find there are a load of merge conflicts at this stage, see Troubleshooting GitHub workflow.
-
Currently, Travis is no longer building our non-prod sites. All the builds and deployments of non-prod sites have been moved to IBM Cloud and now build automatically whenever the a PR is merged into their respective branch. These builds are private and, therefore, their detailed build/deploy progress can't be tracked. However, if you have access to the Slack channel, you can at least track when the builds start and finish.
Request a build of the draft openliberty.io site:-
Sign in to Travis CI with your GitHub account. -
Click More Options > Trigger Build. Typedraft
in the Branch field, then click Trigger custom build.The draft site build starts running.
-
-
When the build is finished, check that the blog renders correctly on either the blog-draft site or the full draft site.
In addition to the existing full draft site we now have a blog-draft site, which contains only the blog content, allowing it to build and deploy much quicker. However, since this site contains only the blog content, any links to other parts of openliberty.io will not resolve. In general, use the blog-draft site to review content because it updates much quicker than the full site. However, if you need to review content that links to pages on openliberty.io that are not in the blogs, use the full draft site.
If you see any problems , such as formatting issues or typos, resolve them first in your branch. Then, create another PR into
draft
branch, link the PR to the issue again, and get the PR merged. Wait for IBM Cloud to rebuild blog-draft site or draft site and verify the change. -
When you're happy with the post, create a PR from your branch (not from the
draft
branch) to thestaging
branch.Link the PR to the issue.
In the PR, provide a link to your post on the blog-draft site or draft site. Ideally, also paste a screenshot of the entire blog post page as this will allow reviewers to see the rendered post content even while the sites are innaccessible (e.g. redeploys).
Add @GraceJansen, as well as your technical reviewer and any other reviewers to get their final approval for both content and format.
As before, make any changes in your feature branch, create a PR
draft
branch, get it merged, and once the site rebuilds, check that everything is correct on the blog-draft site or draft site.This automatically updates the PR to
staging
.
You've written a post!
The editors will now review and edit the post. Please respond to any questions they ask or suggestions they make. Their aim is to make the post readable and useful to its target audience.
Please note that if you have a specific date in mind that you want this blog to be published by, we need a final draft of the blog to be ready for editing in the draft repo a minimum of two weeks prior to the desired publish date.
These steps are completed by the editors of the blog. As editor, you might ask questions or make suggestions to the author of the post. You might also make edits directly in the post to prepare it for publishing.
-
Review the post on the blog-draft site or draft site as linked from the issue.
Ask the author to make changes by adding review comments to the PR.
For edits such as punctuation, formatting, highlighting, adding SEO details, or larger changes discussed with the author, the editor can make the edits directly in the author's branch and push the changes to
draft
branch, which automatically rebuilds the blog-draft site and draft site where you can verify the changes.To check out the author's branch locally:
git fetch origin
thengit checkout -b branch_name origin/branch_name
, which creates a new local branch that's linked to their remote branch. When you've made changes, push them back toorigin/branch_name
. -
When a publishing date has been decided:
-
Check that the post looks fine.
-
Check that the author's details and the SEO details, including front matter, the title, and the filename slug, are appropriate for the post.
-
If necessary, rename the file with the planned publication date.
-
-
Add blog tags to the blog post:
a. In the
staging
branch, update the blogs_tags.json file by adding the slug of the blog post (the file name without the date part or the.adoc
) to the start of theposts
array (1-2 entries per line) for each appropriate tag. You can do this in the web UI editor as long as you're careful with the syntax. This is done in staging to reduce the number of merge conflicts in thedraft
branch later. However, you should backport this change to draft once it is verified on staging.b. Merge the changes to
staging
branch. You can do this in advance of the post being ready (as long as the post's file name doesn't change). It's fine if this file gets merged toprod
earlier than the post itself. -
On the day of publication (or the day before):
a. Approve the PR.
b. Merge the PR into
staging
. -
IBM Cloud will automatically rebuild the blogs-staging site and staging site. If you have access, you can track the progress in the Slack channel.
Request a build of the staging openliberty.io site from Travis CI (typestaging
in the Branch field of the dialog). -
When the build has finished, check to make sure the blog with its blog tags render correctly on the blogs-staging site or staging site. The latter includes the entire site, while the former just has the blog content. If you need to verify links to other parts of the site (outside of the /blogs/ content) then you'll need to wait for the full staging site to build.
This is the final check before the post is published live on the production site.
If there are any problems with the content in the
staging
branch, you must resolve them quickly or revert the PR (the post must not stay instaging
longer than a couple of hours or you risk someone accidentally publishing it for you).Make any changes in the author's branch, and push to both
draft
andstaging
. -
To publish the post, create a PR from
staging
branch toprod
branch and add the author of the post or another editor as approver. -
When the PR is approved, merge it into
prod
. -
Rebuild the production site from the IBM Cloud console.
When the build has finished, check that the post looks as expected on openliberty.io/blog.
If the post's file name uses a future date, the post will not exist on the production site until at least that date and the production site has been rebuilt.
-
When the post is published, and any changes you made are in all three branches (
draft
,staging
, andprod
), delete the author's branch.
You've published a post!
If a published post on openliberty.io/blog contains an error or needs updating in any way, anyone can create a PR to get it fixed.
-
As when creating a new post (see above), clone the
blogs
repo and create a new branch based on theprod
branch. You will do all your work in this branch. -
Open the file in an editor (e.g. VSCode with the Asciidoc plugin) and make any changes needed.
-
If the blog tags need correcting, update the blogs_tags.json file. If you add new tags, make sure to add the blog post's slug to the beginning of the
posts
arrays (1-2 entries per line) for each tag. -
Create a PR from your branch to the
draft
branch. After the PR is merged, wait for IBM Cloud to rebuild the blog-draft site or full draft site. If you have access to this Slack channel, you can use it to track build/deploy progress. Verify the changes on the blog-draft site or draft site.Make any changes in your branch, then push to the
draft
branch again and verify the changes after rebuild. -
Create a PR from your branch to
staging branch
(not fromdraft
branch) and add @GraceJansen as reviewer. You can create this PR at any point because any new changes you make in your branch are automatically added to the PR. -
When the PR is approved, the editor will merge it the
staging
branch, causing IBM Cloud to automatically kick off a build of both the blogs-staging site and staging site, which you can use to verify the changes look correct. -
The approver will then create a PR from
staging
toprod
, then merge and rebuild the production site from the IBM Cloud console to publish the updates on the openliberty.io/blog.
Certain characters (eg apostrophe ' ) in the main heading are displayed incorrectly. To fix, escape with a backslash (\
).
eg = Minimise turnaround times with Open Liberty\'s dev mode
See also:
When you create a PR from your feature branch to the draft
branch, you might find that you have some conflicts. If you use the Web UI to resolve the conflicts and commit those changes, you will find that GitHub has merged everything from the draft
branch into your feature branch, including other people's drafts. You must not try to merge all those changes to staging
or else you'll end up publishing a load of half-finished work. Instead, create a new feature branch off prod
and use the git cherry-pick
command to select only the files that you want to publish from the draft
branch. Then use this new feature branch to create the PR to staging
.
For more about the git cherry-pick
command, see StackOverflow (or search online for more help). You might need some practice to get the hang of it but it's a useful skill to acquire if you do much in GitHub.