Jekyll2024-03-27T17:06:35-07:00https://web.cs.ucla.edu/~weightzero/feed.xmlWeitong ZhangWeitong's personal homepageWeitong Zhangweightzero [at] ucla [dot] eduTraveling in United States2022-01-01T00:00:00-08:002022-01-01T00:00:00-08:00https://web.cs.ucla.edu/~weightzero/posts/travel-us<p>Traveling in United States</p>
<p>===</p>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {
'packages':['geochart'],
});
google.charts.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var discovered = [
'2012 Visition with family',
'2015 Visition with family',
'2021 Cross US trip with Fan',
'2023 Group retreat with Prof. Liu\'s lab',
'2023 NeurIPS conference',
]
var data = google.visualization.arrayToDataTable([
['States', ''],
['US-NJ', 1], ['US-NY', 1], ['US-MA', 1], ['US-CT', 1], ['US-PA', 1], ['US-MD', 1], ['US-DC', 1],
['US-CA', 2], ['US-NV', 2], ['US-UT', 2], ['US-ID', 2], ['US-WY', 2], ['US-IL', 2], ['US-DE', 2],
['US-CO', 3], ['US-KS', 3], ['US-MO', 3], ['US-IN', 3], ['US-OH', 3], ['US-WV', 3], ['US-VA', 3], ['US-AZ', 3],
['US-HI', 4],
['US-LA', 5],
]);
var view = new google.visualization.DataView(data);
view.setColumns([0, {
type: 'number',
label: '',
calc: function (dataTable, rowIndex) {
return {
v: data.getValue(rowIndex, 1),
f: discovered[data.getValue(rowIndex, 1) - 1],
}
}
}])
var options = {
region: 'US',
displayMode: 'regions',
resolution: 'provinces',
tooltip: {showColorCode: false, isHTML: true},
legend: 'none',
colorAxis: {colors: ['#e7711c', '#4374e0']}
};
var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
chart.draw(view, options);
}
</script>
<div id="regions_div" style="aspect-ratio: 16 / 9;" class="col-12 col-md-9"></div>Weitong Zhangweightzero [at] ucla [dot] eduTraveling in United StatesHow to deploy this website?2020-01-01T00:00:00-08:002020-01-01T00:00:00-08:00https://web.cs.ucla.edu/~weightzero/posts/hello<p>Update: I use GitHub actions to deploy this webpage to my local server, it no longer needs to be compiled locally. Now we can complete CV, and homepage (via Jekyll) simultaneously. Here are my GitHub actions</p>
<pre><code class="language-[yaml]">name: Build and Deploy Jekyll Site
on:
push:
branches:
- master # Set your default branch here
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Prepare deployment directory
run: mkdir www _site
- name: Build site
uses: docker://jekyll/jekyll:latest
with:
args: "jekyll build"
- name: Compile LaTeX document for resume
uses: xu-cheng/latex-action@master
with:
working_directory: CV/
root_file: main.tex
args: -xelatex -file-line-error -interaction=nonstopmode
- name: Copy site to www
run: |
cp -r _site/* www/
cp -r assets/* www/assets/
cp -r files/* www/files/
cp -r images/* www/images/
cp CV/main.pdf www/files/cv.pdf
# This step also requires SSH keys to be set up in the secrets.
- name: rsync deployments
uses: burnett01/rsync-deployments@5.2.1
with:
switches: -avzr --delete
path: ./www/
remote_path: ~/www/
remote_host: $
remote_user: $
remote_key: $
</code></pre>
<p>Develop the academia homepage and deploy it on a non-admin server.</p>
<p>I don’t have the admin right on the department server, so it would be messy to install ruby or docker on that server without admins’ permission. My method is to complie the html files on my own machine and copy those files to the department server. I keep the html files on <code class="language-plaintext highlighter-rouge">www/</code> folder and here’s my script</p>
<pre><code class="language-[shell]">rm -rf www/
docker run --rm --volume="$PWD:/srv/jekyll:Z" -it jekyll/jekyll jekyll clean
docker run --rm --volume="$PWD:/srv/jekyll:Z" -it jekyll/jekyll jekyll build
mkdir www/
cp -r _site/* www/
cp -r assets/* www/assets/
cp -r files/* www/files/
cp -r images/* www/images/
rsync -azi --delete ./www/ USRNAME@SERVER:~/www/
</code></pre>
<p>Below is the instructions for the file structure copied from the <a href="https://github.com/academicpages/academicpages.github.io">original template</a></p>
<h2 id="locations-of-key-filesdirectories">Locations of key files/directories</h2>
<ul>
<li>Basic config options: _config.yml</li>
<li>Top navigation bar config: _data/navigation.yml</li>
<li>Single pages: _pages/</li>
<li>Collections of pages are .md or .html files in:
<ul>
<li>_publications/</li>
<li>_portfolio/</li>
<li>_posts/</li>
<li>_teaching/</li>
<li>_talks/</li>
</ul>
</li>
<li>Footer: _includes/footer.html</li>
<li>Static files (like PDFs): /files/</li>
<li>Profile image (can set in _config.yml): images/profile.png</li>
</ul>
<h2 id="tips-and-hints">Tips and hints</h2>
<ul>
<li>Name a file “.md” to have it render in markdown, name it “.html” to render in HTML.</li>
<li>Go to the <a href="https://github.com/academicpages/academicpages.github.io/commits/master">commit list</a> (on your repo) to find the last version Github built with Jekyll.
<ul>
<li>Green check: successful build</li>
<li>Orange circle: building</li>
<li>Red X: error</li>
<li>No icon: not built</li>
</ul>
</li>
</ul>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://shopify.github.io/liquid/tags/control-flow/">Liquid syntax guide</a></li>
</ul>
<h2 id="markdown-guide">Markdown guide</h2>
<h3 id="header-three">Header three</h3>
<h4 id="header-four">Header four</h4>
<h5 id="header-five">Header five</h5>
<h6 id="header-six">Header six</h6>
<h2 id="blockquotes">Blockquotes</h2>
<p>Single line blockquote:</p>
<blockquote>
<p>Quotes are cool.</p>
</blockquote>
<h2 id="tables">Tables</h2>
<h3 id="table-1">Table 1</h3>
<table>
<thead>
<tr>
<th>Entry</th>
<th>Item</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">John Doe</a></td>
<td>2016</td>
<td>Description of the item in the list</td>
</tr>
<tr>
<td><a href="#">Jane Doe</a></td>
<td>2019</td>
<td>Description of the item in the list</td>
</tr>
<tr>
<td><a href="#">Doe Doe</a></td>
<td>2022</td>
<td>Description of the item in the list</td>
</tr>
</tbody>
</table>
<h3 id="table-2">Table 2</h3>
<table>
<thead>
<tr>
<th style="text-align: left">Header1</th>
<th style="text-align: center">Header2</th>
<th style="text-align: right">Header3</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">cell1</td>
<td style="text-align: center">cell2</td>
<td style="text-align: right">cell3</td>
</tr>
<tr>
<td style="text-align: left">cell4</td>
<td style="text-align: center">cell5</td>
<td style="text-align: right">cell6</td>
</tr>
</tbody>
<tbody>
<tr>
<td style="text-align: left">cell1</td>
<td style="text-align: center">cell2</td>
<td style="text-align: right">cell3</td>
</tr>
<tr>
<td style="text-align: left">cell4</td>
<td style="text-align: center">cell5</td>
<td style="text-align: right">cell6</td>
</tr>
</tbody>
<tfoot>
<tr>
<td style="text-align: left">Foot1</td>
<td style="text-align: center">Foot2</td>
<td style="text-align: right">Foot3</td>
</tr>
</tfoot>
</table>
<h2 id="definition-lists">Definition Lists</h2>
<dl>
<dt>Definition List Title</dt>
<dd>Definition list division.</dd>
<dt>Startup</dt>
<dd>A startup company or startup is a company or temporary organization designed to search for a repeatable and scalable business model.</dd>
<dt>#dowork</dt>
<dd>Coined by Rob Dyrdek and his personal body guard Christopher “Big Black” Boykins, “Do Work” works as a self motivator, to motivating your friends.</dd>
<dt>Do It Live</dt>
<dd>I’ll let Bill O’Reilly <a href="https://www.youtube.com/watch?v=O_HyZ5aW76c" title="We'll Do It Live">explain</a> this one.</dd>
</dl>
<h2 id="unordered-lists-nested">Unordered Lists (Nested)</h2>
<ul>
<li>List item one
<ul>
<li>List item one
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ul>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ul>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ul>
<h2 id="ordered-list-nested">Ordered List (Nested)</h2>
<ol>
<li>List item one
<ol>
<li>List item one
<ol>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
<h2 id="buttons">Buttons</h2>
<p>Make any link standout more when applying the <code class="language-plaintext highlighter-rouge">.btn</code> class.</p>
<h2 id="notices">Notices</h2>
<p class="notice"><strong>Watch out!</strong> You can also add notices by appending <code class="language-plaintext highlighter-rouge">{: .notice}</code> to a paragraph.</p>
<h2 id="html-tags">HTML Tags</h2>
<h3 id="address-tag">Address Tag</h3>
<address>
1 Infinite Loop<br /> Cupertino, CA 95014<br /> United States
</address>
<h3 id="anchor-tag-aka-link">Anchor Tag (aka. Link)</h3>
<p>This is an example of a <a href="http://github.com" title="Github">link</a>.</p>
<h3 id="abbreviation-tag">Abbreviation Tag</h3>
<p>The abbreviation <abbr title="Cascading Style Sheets">CSS</abbr> stands for “Cascading Style Sheets”.</p>
<h3 id="cite-tag">Cite Tag</h3>
<p>“Code is poetry.” —<cite>Automattic</cite></p>
<h3 id="code-tag">Code Tag</h3>
<p>You will learn later on in these tests that <code class="language-plaintext highlighter-rouge">word-wrap: break-word;</code> will be your best friend.</p>
<h3 id="strike-tag">Strike Tag</h3>
<p>This tag will let you <strike>strikeout text</strike>.</p>
<h3 id="emphasize-tag">Emphasize Tag</h3>
<p>The emphasize tag should <em>italicize</em> text.</p>
<h3 id="insert-tag">Insert Tag</h3>
<p>This tag should denote <ins>inserted</ins> text.</p>
<h3 id="keyboard-tag">Keyboard Tag</h3>
<p>This scarcely known tag emulates <kbd>keyboard text</kbd>, which is usually styled like the <code class="language-plaintext highlighter-rouge"><code></code> tag.</p>
<h3 id="preformatted-tag">Preformatted Tag</h3>
<p>This tag styles large blocks of code.</p>
<pre>
.post-title {
margin: 0 0 5px;
font-weight: bold;
font-size: 38px;
line-height: 1.2;
and here's a line of some really, really, really, really long text, just to see how the PRE tag handles it and to find out how it overflows;
}
</pre>
<h3 id="quote-tag">Quote Tag</h3>
<p><q>Developers, developers, developers…</q> –Steve Ballmer</p>
<h3 id="strong-tag">Strong Tag</h3>
<p>This tag shows <strong>bold text</strong>.</p>
<h3 id="subscript-tag">Subscript Tag</h3>
<p>Getting our science styling on with H<sub>2</sub>O, which should push the “2” down.</p>
<h3 id="superscript-tag">Superscript Tag</h3>
<p>Still sticking with science and Isaac Newton’s E = MC<sup>2</sup>, which should lift the 2 up.</p>
<h3 id="variable-tag">Variable Tag</h3>
<p>This allows you to denote <var>variables</var>.</p>Weitong Zhangweightzero [at] ucla [dot] eduUpdate: I use GitHub actions to deploy this webpage to my local server, it no longer needs to be compiled locally. Now we can complete CV, and homepage (via Jekyll) simultaneously. Here are my GitHub actions