Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Draft Forbes Group Website (Build by Nikola). The official site is hosted at:

https://labs.wsu.edu/forbes

5910 views
License: GPL3
ubuntu2004
1
<?xml version="1.0" encoding="utf-8"?>
2
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The Forbes Group (Posts about tips)</title><link>http://swan.physics.wsu.edu/forbes/</link><description></description><atom:link href="http://swan.physics.wsu.edu/forbes/categories/cat_tips.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2023 &lt;a href="mailto:Michael McNeil Forbes &lt;[email protected]&gt;"&gt;Michael McNeil Forbes&lt;/a&gt; </copyright><lastBuildDate>Wed, 15 Mar 2023 01:00:15 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Creating a Post</title><link>http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/</link><dc:creator>Michael McNeil Forbes</dc:creator><description>&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
3
&lt;/div&gt;&lt;div class="inner_cell"&gt;
4
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
5
&lt;h2 id="Creating-a-Post"&gt;Creating a Post&lt;a class="anchor-link" href="http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/#Creating-a-Post"&gt;&lt;/a&gt;&lt;/h2&gt;
6
&lt;/div&gt;
7
&lt;/div&gt;
8
&lt;/div&gt;
9
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
10
&lt;/div&gt;&lt;div class="inner_cell"&gt;
11
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
12
&lt;h3 id="Initial-Image"&gt;Initial Image&lt;a class="anchor-link" href="http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/#Initial-Image"&gt;&lt;/a&gt;&lt;/h3&gt;
13
&lt;/div&gt;
14
&lt;/div&gt;
15
&lt;/div&gt;
16
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
17
&lt;/div&gt;&lt;div class="inner_cell"&gt;
18
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
19
&lt;p&gt;The first part of a post should be an image which will appear on cover pages etc. It should be included using one of the following sets of code:&lt;/p&gt;
20
&lt;ul&gt;
21
&lt;li&gt;&lt;p&gt;The first part of a post should be an image which will appear on cover pages etc. It should be included using one of the following sets of code:&lt;/p&gt;
22
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;![&lt;span class="nt"&gt;Text&lt;/span&gt;](&lt;span class="na"&gt;&amp;lt;URL or /images/filename.png&amp;gt;&lt;/span&gt;)
23
Optional text.
24
&lt;/pre&gt;&lt;/div&gt;
25
&lt;/li&gt;
26
&lt;/ul&gt;
27
28
&lt;/div&gt;
29
&lt;/div&gt;
30
&lt;/div&gt;
31
&lt;div class="cell border-box-sizing code_cell rendered"&gt;
32
&lt;div class="input"&gt;
33
&lt;div class="prompt input_prompt"&gt;In [2]:&lt;/div&gt;
34
&lt;div class="inner_cell"&gt;
35
&lt;div class="input_area"&gt;
36
&lt;div class=" highlight hl-ipython2"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"This is a really long line of actual code. Is it formatted differently and with wrapping?"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
37
&lt;/pre&gt;&lt;/div&gt;
38
39
&lt;/div&gt;
40
&lt;/div&gt;
41
&lt;/div&gt;
42
43
&lt;div class="output_wrapper"&gt;
44
&lt;div class="output"&gt;
45
46
47
&lt;div class="output_area"&gt;
48
49
&lt;div class="prompt"&gt;&lt;/div&gt;
50
51
52
&lt;div class="output_subarea output_stream output_stdout output_text"&gt;
53
&lt;pre&gt;This is a really long line of actual code. Is it formatted differently and with wrapping?
54
&lt;/pre&gt;
55
&lt;/div&gt;
56
&lt;/div&gt;
57
58
&lt;/div&gt;
59
&lt;/div&gt;
60
61
&lt;/div&gt;
62
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
63
&lt;/div&gt;&lt;div class="inner_cell"&gt;
64
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
65
&lt;ul&gt;
66
&lt;li&gt;&lt;p&gt;Pure &lt;a href="https://daringfireball.net/projects/markdown/syntax#img"&gt;markdown&lt;/a&gt;:&lt;/p&gt;
67
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;![&lt;span class="nt"&gt;Textual description (alt text) of the image&lt;/span&gt;](&lt;span class="na"&gt;&amp;lt;URL or /images/filename.png&amp;gt;&lt;/span&gt;)
68
Optional text such as image credit (which could be in the alt text).
69
&lt;/pre&gt;&lt;/div&gt;
70
&lt;ul&gt;
71
&lt;li&gt;&lt;p&gt;Another list:&lt;/p&gt;
72
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;![&lt;span class="nt"&gt;Textual description (alt text) of the image&lt;/span&gt;](&lt;span class="na"&gt;&amp;lt;URL or /images/filename.png&amp;gt;&lt;/span&gt;)
73
Optional text such as image credit (which could be in the alt text).
74
&lt;/pre&gt;&lt;/div&gt;
75
&lt;/li&gt;
76
&lt;/ul&gt;
77
&lt;p&gt;This is the simplest option, but has very &lt;span class="target"&gt;little flexibility.&lt;/span&gt;
78
&lt;span class="marginnote"&gt;For example, markdown images cannot be resized, or embeded as links. In principle, this could be nested in HTML with &lt;code&gt;&amp;lt;a href=...&amp;gt;...&amp;lt;/a&amp;gt;&lt;/code&gt; but presently the conversion to HTML passes through &lt;a href="http://docutils.sourceforge.net/rst.html"&gt;reStructureText&lt;/a&gt; which does not permit nested markup.&lt;/span&gt;&lt;/p&gt;
79
&lt;/li&gt;
80
&lt;li&gt;&lt;p&gt;Pure HTML.&lt;/p&gt;
81
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;lt;a href="http://dx.doi.org/10.1103/PhysRevLett.118.155301"
82
class="image"&amp;gt;
83
&amp;lt;img alt="Textual description (alt text) of the image."
84
src="&amp;lt;URL or /images/filename.png&amp;gt;"&amp;gt;
85
&amp;lt;/a&amp;gt;
86
&lt;/pre&gt;&lt;/div&gt;
87
&lt;p&gt;This allows you to add links, or any other formatting.&lt;/p&gt;
88
&lt;/li&gt;
89
&lt;/ul&gt;
90
91
&lt;/div&gt;
92
&lt;/div&gt;
93
&lt;/div&gt;
94
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
95
&lt;/div&gt;&lt;div class="inner_cell"&gt;
96
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
97
&lt;h4 id="Image-Files"&gt;Image Files&lt;a class="anchor-link" href="http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/#Image-Files"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Images can either be referenced by URL, or locally. The advantage of local images is that they will be available even when off-line, or if the link breaks, but they require storing the image locally and distributing it.&lt;/p&gt;
98
&lt;p&gt;To manage images, we have a top level folder &lt;a href="http://swan.physics.wsu.edu/forbes/images"&gt;&lt;code&gt;/images&lt;/code&gt;&lt;/a&gt; in our website folder (the top level Nikola project) in which we store all of the images. This folder will be copied by Nikola to the site. We refer to these locally using an absolute filename &lt;a href="http://swan.physics.wsu.edu/forbes/images/filename.png"&gt;&lt;code&gt;/images/filename.png&lt;/code&gt;&lt;/a&gt;. In order to make this work in the Jupyter notebooks while editing, we symlink the &lt;a href="http://swan.physics.wsu.edu/forbes/images"&gt;&lt;code&gt;/images&lt;/code&gt;&lt;/a&gt; to the directory where the notebook server is running. Thus, if you always start the server from the top level of the Nikola site, no symlinks are required.&lt;/p&gt;
99
&lt;p&gt;A good source of images is:&lt;/p&gt;
100
&lt;ul&gt;
101
&lt;li&gt;&lt;a href="https://unsplash.com/"&gt;https://unsplash.com/&lt;/a&gt;&lt;/li&gt;
102
&lt;/ul&gt;
103
&lt;p&gt;These are free for use without any restrictions (although attribution is appreciated).&lt;/p&gt;
104
105
&lt;/div&gt;
106
&lt;/div&gt;
107
&lt;/div&gt;
108
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
109
&lt;/div&gt;&lt;div class="inner_cell"&gt;
110
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
111
&lt;h2 id="Examples"&gt;Examples&lt;a class="anchor-link" href="http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/#Examples"&gt;&lt;/a&gt;&lt;/h2&gt;
112
&lt;/div&gt;
113
&lt;/div&gt;
114
&lt;/div&gt;
115
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
116
&lt;/div&gt;&lt;div class="inner_cell"&gt;
117
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
118
&lt;h3 id="Images"&gt;Images&lt;a class="anchor-link" href="http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/#Images"&gt;&lt;/a&gt;&lt;/h3&gt;
119
&lt;/div&gt;
120
&lt;/div&gt;
121
&lt;/div&gt;
122
&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;
123
&lt;/div&gt;&lt;div class="inner_cell"&gt;
124
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
125
&lt;ul&gt;
126
&lt;li&gt;Simple Markdown inclusion of photo with credit in Alt text:&lt;/li&gt;
127
&lt;/ul&gt;
128
&lt;a href="https://unsplash.com/photos/uCzBVrIbdvQ"&gt;
129
![Photo of Stars by Teddy Kelley on Unsplash](https://unsplash.com/photos/uCzBVrIbdvQ/download)
130
&lt;/a&gt;
131
&lt;ul&gt;
132
&lt;li&gt;Simple Markdown inclusion of photo with credit as following badge. (The &lt;a href="https://unsplash.com/photos/uCzBVrIbdvQ"&gt;Unsplash image page&lt;/a&gt; provides a link on each images page with the &lt;a href="https://unsplash.com/?modal=%7B%22type%22%3A%22credit-badge%22%2C%22userId%22%3A%22xqiscbtGdPc%22%7D&amp;amp;photo=uCzBVrIbdvQ"&gt;badge code&lt;/a&gt; which you can just copy and paste.):&lt;/li&gt;
133
&lt;/ul&gt;
134
&lt;p&gt;&lt;img src="https://unsplash.com/photos/uCzBVrIbdvQ/download" alt="Photo of Stars"&gt;
135
&lt;a style='background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px;' href="https://unsplash.com/@teddykelley?utm_medium=referral&amp;amp;utm_campaign=photographer-credit&amp;amp;utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Teddy Kelley"&gt;&lt;span style="display:inline-block;padding:2px 3px;"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-1px;fill:white;" viewbox="0 0 32 32"&gt;&lt;title&gt;&lt;/title&gt;&lt;path d="M20.8 18.1c0 2.7-2.2 4.8-4.8 4.8s-4.8-2.1-4.8-4.8c0-2.7 2.2-4.8 4.8-4.8 2.7.1 4.8 2.2 4.8 4.8zm11.2-7.4v14.9c0 2.3-1.9 4.3-4.3 4.3h-23.4c-2.4 0-4.3-1.9-4.3-4.3v-15c0-2.3 1.9-4.3 4.3-4.3h3.7l.8-2.3c.4-1.1 1.7-2 2.9-2h8.6c1.2 0 2.5.9 2.9 2l.8 2.4h3.7c2.4 0 4.3 1.9 4.3 4.3zm-8.6 7.5c0-4.1-3.3-7.5-7.5-7.5-4.1 0-7.5 3.4-7.5 7.5s3.3 7.5 7.5 7.5c4.2-.1 7.5-3.4 7.5-7.5z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span style="display:inline-block;padding:2px 3px;"&gt;Teddy Kelley&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
136
&lt;a href="http://dx.doi.org/10.1103/PhysRevLett.118.155301" class="image"&gt;
137
&lt;img alt="Schematic of an expanding BEC entering the regime of negative mass." src="http://swan.physics.wsu.edu/forbes/images/PRL_front_pic_v3.svg"&gt;&lt;/a&gt;
138
139
&lt;/div&gt;
140
&lt;/div&gt;
141
&lt;/div&gt;
142
&lt;div class="cell border-box-sizing code_cell rendered"&gt;
143
&lt;div class="input"&gt;
144
&lt;div class="prompt input_prompt"&gt;In [ ]:&lt;/div&gt;
145
&lt;div class="inner_cell"&gt;
146
&lt;div class="input_area"&gt;
147
&lt;div class=" highlight hl-ipython2"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;
148
&lt;/pre&gt;&lt;/div&gt;
149
150
&lt;/div&gt;
151
&lt;/div&gt;
152
&lt;/div&gt;
153
154
&lt;/div&gt;</description><guid>http://swan.physics.wsu.edu/forbes/public/tips/creating-a-post/</guid><pubDate>Fri, 28 Jul 2017 19:11:16 GMT</pubDate></item></channel></rss>
155