Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Saturday, March 16, 2024

Some blog cleanup

A short time ago I looked at some old posts after changing the theme css for this blog.  Much of the theme changes should not have affected the display of any pages or posts and I still think that was not the cause. However, I did find at least two pages in the distilled section which did not display properly.  Those i had built with the online editor of this site and when I looked at the source discovered how horrible they were. Since this may be a task for me for a bit of time, to clean up and improve pages and posts here, I added a further note to the header that I am aware of the display issues while I complete this.  I also want to finally change the background image to something different that I create mysefl, but intend to use inkscape and this fails for me at present.

Since I am not going to show the rendered new versus old, I'll show you how the change looks in the source as I adjust it. Below is what I found as source on the site initially, which I wrote in 2021, already some years old now.

Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory: <br /><p><span style="font-family: courier;">cp -pRP /usr/src /usr/src-last_svn_update</span></p><p><span style="font-family: courier;"> </span></p><p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.<br /></p><p><span style="font-family: courier;">rm -rf /usr/src </span></p><p><span style="font-family: courier;"><span style="font-family: courier;">mkdir /usr/src</span> <br /></span></p><p>Or just delete the /usr/src directory contents:<br /></p><span style="font-family: courier;">rm -rf /usr/src/*</span><p><span style="font-family: courier;"></span></p><p> <br /><br />Now obtain source <br /><span style="font-family: courier;">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span> <br /><br />Source for a specific branch (depth implies single-branch)<br /><span style="font-family: courier;">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span></p><p> </p><p>Update -- the first line is needed for the initial update, just the pull thereafter.<br /></p><p><span style="font-family: courier;">git config pull.rebase true</span></p><p><span style="font-family: courier;">git pull</span></p><p><br /></p><p>FYI Sept 2021 github change.</p><p>Adjust url from git:// to https://</p><p><span style="font-family: courier;">edit .git/config</span></p><p><span style="font-family: courier;">under [origin] modify the url</span></p><p><span style="font-family: courier;">from: <br /></span></p><p><span style="font-family: courier;"> url = git://github.com/freebsd/freebsd.git</span></p><p><span style="font-family: courier;">to:</span></p><p><span style="font-family: courier;"> </span><span style="font-family: courier;">url = https://github.com/freebsd/freebsd.git</span><span style="font-family: courier;"></span></p>

It turns out that once again I managed to get something done without documenting it.  The worst looking page had been "Updating Kernel & World" both with how it was rendered (many things were missing and not visible) and how the html looked. The above example is not nice but because I did a bit more complex display for the other page, there were numerous extra essentially empty span and div tags, bunches of inline style, extra page break tags.  It took a while to clean up and the revised version is somewhat different since I am using a more standardized set of css for everything. One other thing to notice about the above example source is the text formatting of it itself.  I have been using the wordwrap feature of bluefish editor so other pages and posts will look similar.  That the above includes a lot of inline style means both that it is of course old and likely edited online as well.

After the initial cleanup to better see how it is, you can notice once more a lot of excess junk that is useless or not needed. I used bluefish to replace all "<" with "<" followed with a carriage return. I am not going to show a continual pile of adjustments, just the original, this one, and the final cleaned html.

Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory:
<br />
<p>
<span style="font-family: courier;">cp -pRP /usr/src /usr/src-last_svn_update
</span>
</p>
<p>
<span style="font-family: courier;"> 
</span>
</p>
<p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.
<br />
</p>
<p>
<span style="font-family: courier;">rm -rf /usr/src 
</span>
</p>
<p>
<span style="font-family: courier;">
<span style="font-family: courier;">mkdir /usr/src
</span>
<br />
</span>
</p>
<p>Or just delete the /usr/src directory contents:
<br />
</p>
<span style="font-family: courier;">rm -rf /usr/src/*
</span>
<p>
<span style="font-family: courier;">
</span>
</p>
<p> 
<br />
<br />Now obtain source
<br />
<span style="font-family: courier;">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src
</span>
<br />
<br />Source for a specific branch (depth implies single-branch)
<br />
<span style="font-family: courier;">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src
</span>
</p>
<p> 
</p>
<p>Update -- the first line is needed for the initial update, just the pull thereafter.
<br />
</p>
<p>
<span style="font-family: courier;">git config pull.rebase true
</span>
</p>
<p>
<span style="font-family: courier;">git pull
</span>
</p>
<p>
<br />
</p>
<p>FYI Sept 2021 github change.
</p>
<p>Adjust url from git:// to https://
</p>
<p>
<span style="font-family: courier;">edit .git/config
</span>
</p>
<p>
<span style="font-family: courier;">under [origin] modify the url
</span>
</p>
<p>
<span style="font-family: courier;">from:
<br />
</span>
</p>
<p>
<span style="font-family: courier;"> url = git://github.com/freebsd/freebsd.git
</span>
</p>
<p>
<span style="font-family: courier;">to:
</span>
</p>
<p>
<span style="font-family: courier;"> 
</span>
<span style="font-family: courier;">url = https://github.com/freebsd/freebsd.git
</span>
<span style="font-family: courier;">
</span>
</p>

After a lot of deletions and substitutions we have a much better version of the html for the page and it will display slightly different as it uses the css from my customized theme.  Instead of a single long line as a paragraph, each distinct paragraph within the <p> tags is one long editor word-wrapped line which still permits readability without the effort of inserting linebreaks manually (which is a bit too much unnecessary effort).

<p>Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory: </p><p><span class="icode">cp -pRP /usr/src /usr/src-last_svn_update</span></p>
<p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.</p>
<p><span class="icode">rm -rf /usr/src </span></p>
<p><span class="icode">mkdir /usr/src</span>
<p>Or just delete the /usr/src directory contents:</p>
<p><span class="icode">rm -rf /usr/src/*</span></p>
<p>Now obtain source </p>
<p><span class="icode">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span> </p>
<p>Source for a specific branch (depth implies single-branch)</p>
<p><span class="icode">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span></p>
<p>Update -- the first line is needed for the initial update, just the pull thereafter.</p>
<p><span class="icode">git config pull.rebase true</span></p>
<p><span class="icode">git pull</span></p>
<p>FYI Sept 2021 github change.</p>
<p>Adjust url from git:// to https://</p>
<p><span class="icode">edit .git/config</span></p>
<p><span class="icode">under [origin] modify the url</span></p>
<p>from:</p>
<p><span class="icode">url = git://github.com/freebsd/freebsd.git</span></p>
<p>to:</p>
<p><span class="icode">url = https://github.com/freebsd/freebsd.git</span></p>

Not only have I cleaned up a number of pages and posts, with more yet to complete to my satisfaction, I decided to revise the appearance.  Gone is that orangy stained glass image background, and some other colors have been revised.  I wanted to create my own background image but as image uploads are rather indirect due to how this site or firefox has been acting lately, I may not do so much with images here, and I chose to let the online theme editor suffice.  I hope overall that this blog is now considerably more readable. Remember, you could write your own for the same purpose that I have been, to contribute back a perspective and tips and feedback to the community.

No comments:

Post a Comment

Thank you for your interest!

Frequently viewed this week