Skip to content

Commit f8f29ce

Browse files
committed
Wrote readme and created example markdown
1 parent 772e8c4 commit f8f29ce

10 files changed

+163
-32
lines changed

README.md

+38-32
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,59 @@
1-
# Pulsar Neightborhood web site
2-
Welcome to the home for the [Pulsar Neighborhood site](https://pulsar-neighborhood.com).
1+
# Pulsar Neighborhood web site
2+
Welcome to the home for the [Pulsar Neighborhood site](https://pulsar-neighborhood.com). This is the source behind the magic. As an open community we welcome all ideas and contributions, whether it is a new feature on the site or content you would like to see.
33

44
## About the site's framework
55

6-
## Contributing articles, guides, ideas and everything else
6+
Pulsar Neighborhood was created on the [Hugo framework](https://gohugo.io/). It uses bootstrap components to create the wondrous experience that is. There is a mix of core Hugo functions, good ideas from seasoned Hugo experts, as well as the odd idea found out in the wild. We try to follow the best practices of Hugo when it comes to the site's folder structure and naming. If you are familiar with the framework, then this site is [hopefully] very easy to get started with.
77

8-
Got a idea of a topic others might be interested in? Want to share your learnings about Pulsar with the commnity?
8+
If you see something about the site's design that could be a little better please [make a suggestion](https://github.com/pulsar-neighborhood/pulsar-neighborhood.github.io/issues) or PR that great idea right in to the project.
99

10-
Head over to the issues tab and open the appropriate type. This will provide a simple template you can follow to make sure everything is in line.
10+
It was chosen to keep the original content type of `page` and create 3 new layouts: article, guide, and spotlight. Articles are the most common and represent a blog post, video, or some other written story about Pulsar. Guides are step by step instructions on how to achieve some goal using Pulsar. Spotlight is a special type used for the community spotlight section of the site.
1111

12-
Once submitted a site contributor will be in contact with next steps.
12+
## "I love the spotlight" - said no software engineer, ever
1313

14+
Don't sweat this. It's less about you and more about what you've done with Pulsar. If you've got something to share but don't feel like writing it all out let's put it in the spotlight. [Open a spotlight issue](https://github.com/pulsar-neighborhood/pulsar-neighborhood.github.io/issues/new?assignees=&labels=&template=community-member-spotlight.md&title=Check%20my%20Pulsar%20skillz) and give us a sentence or two about the cool things you've done. Share a link if it's something public.
1415

15-
## Contributing content
1616

17-
The site has two different type of content - articles and guides. Articles can be thought of as a blog post but could have code snippets. Generally
17+
## Contributing ideas and content
1818

19-
If you have ideas of content you would like to see on the site,
19+
It can be a simple idea, a written article, or a half though-out step by step guide. However far along the content is, the community is here to help make it a pulitzer candidate. Your options...
2020

21-
## Content formatting examples
21+
### Opening an issue (simplest)
2222

23-
### Tabs
24-
{{< tabs tabTotal="4">}}
25-
{{< tab tabName="C#" >}}
23+
When you [open an issue](https://github.com/pulsar-neighborhood/pulsar-neighborhood.github.io/issues/new/choose) in the repo you are asked to choose from a template. Use this to choose the type of content the best fits your idea. Paste your markdown within the "content" area of the new issue or simply type out a few lines of idea. There are a few additional areas of interest like title, author info, image, etc. All of this is optional. A content moderator will guide you through getting everything right.
2624

27-
```csharp
28-
public void DoSomehting(){
29-
return;
30-
}
31-
```
3225

33-
{{< /tab >}}
34-
{{< tab tabName="Java" >}}
26+
### Running the site locally
27+
28+
If you're feeling adventurous (and have a basic understanding of Hugo) you could fork the repo and develop your idea locally. Then open a pull request to suggest the idea in the main site. Below are commands you can use to get content started:
3529

36-
```java
37-
public void DoSomehting(){
38-
return;
39-
}
30+
Create a new article:
31+
```bash
32+
hugo new articles/my-really-great-idea.md
4033
```
4134

42-
{{< /tab >}}
43-
{{< tab tabName="Go">}}
35+
Create a new guide:
36+
```bash
37+
hugo new guides/my-step-by-step-guide.md
38+
```
39+
## Content formatting examples
40+
41+
As you write content for the community use the below markdown examples to take things to the next level. Spoiler - no one likes a wall of text and everyone loves reading code.
42+
43+
[Guide steps](content/examples/guide.md) - use this to get a step by step guide started
44+
45+
[Tabs](content/examples/tabs.md) - share your code in multiple runtimes
46+
47+
[Code Snippets](content/examples/code-snippet.md) - include snippets throughout your content, maybe even highlight a line and comment on it
48+
49+
[Blockquotes](content/examples/blockquote.md) - make a statement
50+
51+
[Information Callout](content/examples/info-callout.md) - include a call out box with further info about a topic
4452

45-
**Go Content**
53+
[Warning Callout](content/examples/warn-callout.md) - include a call out box with fair warning about something
4654

47-
{{< /tab >}}
48-
{{< tab tabName="Python">}}
55+
[Danger Callout](content/examples/danger-callout.md) - include a call out box that warns of dragons or ill-tempered creatures ahead
4956

50-
**Python Content**
57+
[Success Callout](content/examples/success-callout.md) - include a call out box declaring a win
5158

52-
{{< /tab >}}
53-
{{< /tabs >}}
59+
[Table](content/examples/table.md) - markdown tables aren't the best, use this to go a little further

content/examples/blockquote.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This is an example page showing how to use markdown on the Pulsar Neighborhood site to include a blockquote element.
2+
3+
> This is something super meaningful

content/examples/code-snippet.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to include code snippets in content.
2+
3+
A very basic snippet:
4+
```csharp
5+
public void DoSomething()
6+
{
7+
return;
8+
}
9+
```
10+
11+
A more involved snippet using Hugo's [built-in highlighting](https://gohugo.io/content-management/syntax-highlighting/). Now you can call out what is happening in the highlighted lines while still giving the overall functional context.
12+
13+
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
14+
// GetTitleFunc returns a func that can be used to transform a string to
15+
// title case.
16+
//
17+
// The supported styles are
18+
//
19+
// - "Go" (strings.Title)
20+
// - "AP" (see https://www.apstylebook.com/)
21+
// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
22+
//
23+
// If an unknown or empty style is provided, AP style is what you get.
24+
func GetTitleFunc(style string) func(s string) string {
25+
switch strings.ToLower(style) {
26+
case "go":
27+
return strings.Title
28+
case "chicago":
29+
return transform.NewTitleConverter(transform.ChicagoStyle)
30+
default:
31+
return transform.NewTitleConverter(transform.APStyle)
32+
}
33+
}
34+
{{< / highlight >}}

content/examples/danger-callout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to include code snippets in content.
2+
3+
{{< danger >}}
4+
There be dragons
5+
{{< /danger >}}

content/examples/guide.md

Whitespace-only changes.

content/examples/info-callout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to include code snippets in content.
2+
3+
{{< info >}}
4+
This is information that you need to know.
5+
{{< /info >}}

content/examples/success-callout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to include code snippets in content.
2+
3+
{{< success >}}
4+
Haazaa you've done it!
5+
{{< /success >}}

content/examples/table.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to create tabbed information.
2+
3+
{{<table table_class="table table-striped table-bordered">}}
4+
5+
| Animal | Sounds |
6+
|---------|--------|
7+
| Cat | Meow |
8+
| Dog | Woof |
9+
| Cricket | Chirp |
10+
11+
{{</table>}}
12+
13+
A table with more formatting
14+
15+
{{<table table_class="table table-sm table-primary" thead_class="thead-dark" caption="These are sounds">}}
16+
17+
| Animal | Sounds |
18+
|---------|--------|
19+
| Cat | Meow |
20+
| Dog | Woof |
21+
| Cricket | Chirp |
22+
23+
{{</table>}}

content/examples/tabs.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to create tabbed information.
2+
3+
{{< tabs tabTotal="4">}}
4+
{{< tab tabName="C#" >}}
5+
6+
```csharp
7+
public void DoSomething()
8+
{
9+
return;
10+
}
11+
```
12+
13+
{{< /tab >}}
14+
{{< tab tabName="Java" >}}
15+
16+
```java
17+
public Integer getLength(String str)
18+
{
19+
return str.length();
20+
}
21+
```
22+
23+
{{< /tab >}}
24+
{{< tab tabName="Go">}}
25+
26+
```golang
27+
func plusPlus(a, b, c int) int
28+
{
29+
return a + b + c
30+
}
31+
```
32+
33+
{{< /tab >}}
34+
{{< tab tabName="Python">}}
35+
36+
```python
37+
def greet(name):
38+
"""
39+
This function greets to the person passed in as a parameter
40+
"""
41+
print("Hello, " + name + ". Good morning!")
42+
```
43+
44+
{{< /tab >}}
45+
{{< /tabs >}}

content/examples/warn-callout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is an example page showing how to use Hugo shortcodes on the Pulsar Neighborhood site to include code snippets in content.
2+
3+
{{< warning >}}
4+
You now have fair warning to not make that mistake
5+
{{< /warning >}}

0 commit comments

Comments
 (0)