Skip to content

Commit f725f69

Browse files
committed
Copied from hellotham-website
1 parent 349011f commit f725f69

File tree

287 files changed

+4184
-1449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+4184
-1449
lines changed

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# CONTRIBUTING
2+
3+
Contributions are always welcome, no matter how large or small. Before contributing,
4+
please read the [code of conduct](CODE_OF_CONDUCT.md).
5+
6+
## Setup
7+
8+
> Install yarn on your system: [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
9+
10+
### Install dependencies
11+
12+
> Only required on the first run, subsequent runs can use `yarn` to both
13+
bootstrap and run the development server using `yarn develop`.
14+
Since this starter using the [netlify-dev](https://www.netlify.com/products/dev/#how-it-works), there could be further issues you, please check the [netlify-dev](https://github.com/netlify/netlify-dev) repository for further information and set up questions.
15+
16+
```sh
17+
$ git clone https://github.com/netlify-templates/gatsby-starter-netlify-cms
18+
$ yarn
19+
```
20+
21+
## Available scripts
22+
23+
24+
### `build`
25+
26+
Build the static files into the `public` folder, turns lambda functions into a deployable form.
27+
28+
#### Usage
29+
30+
```sh
31+
$ yarn build
32+
```
33+
34+
### `clean`
35+
36+
Runs `gatsby clean` command.
37+
38+
#### Usage
39+
40+
```sh
41+
yarn clean
42+
```
43+
44+
### `netlify dev`
45+
46+
Starts the netlify dev environment, including the gatsby dev environment.
47+
For more infor check the [Netlify Dev Docs](https://github.com/netlify/cli/blob/master/docs/netlify-dev.md)
48+
49+
```sh
50+
netlify dev
51+
```
52+
53+
### `develop` or `start`
54+
55+
Runs the `clean` script and starts the gatsby develop server using the command `gatsby develop`. We recomend using this command when you don't need Netlify specific features
56+
57+
#### Usage
58+
59+
```sh
60+
yarn develop
61+
```
62+
### `test`
63+
64+
Not implmented yet
65+
66+
#### Usage
67+
68+
```sh
69+
yarn test
70+
```
71+
72+
### `format`
73+
74+
Formats code and docs according to our style guidelines using `prettier`
75+
76+
#### Usage
77+
78+
```sh
79+
yarn format
80+
```
81+
82+
83+
## Pull Requests
84+
85+
We actively welcome your pull requests!
86+
87+
If you need help with Git or our workflow, please ask on [Gitter.im](https://gitter.im/netlify/NetlifyCMS). We want your contributions even if you're just learning Git. Our maintainers are happy to help!
88+
89+
Netlify CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) + [Feature Branches](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). Additionally, PR's should be [rebased](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) on master when opened, and again before merging.
90+
91+
1. Fork the repo.
92+
2. Create a branch from `master`. If you're addressing a specific issue, prefix your branch name with the issue number.
93+
2. If you've added code that should be tested, add tests.
94+
3. If you've changed APIs, update the documentation.
95+
4. Run `yarn test` and ensure the test suite passes. (Not applicable yet)
96+
5. Use `yarn format` to format and lint your code.
97+
6. PR's must be rebased before merge (feel free to ask for help).
98+
7. PR should be reviewed by two maintainers prior to merging.
99+
100+
## License
101+
102+
By contributing to the Gatsby - Netlify CMS starter, you agree that your contributions will be licensed
103+
under its [MIT license](LICENSE).

LICENSE

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2022 Hello Tham Pty Ltd
3+
Copyright (c) 2015 gatsbyjs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+

PULL_REQUEST_TEMPLATE.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
2+
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
3+
<!-- Try to link to an open issue for more information. -->
4+
5+
6+
<!-- In addition to that please answer these questions: -->
7+
8+
**What kind of change does this PR introduce?**
9+
10+
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->
11+
12+
**Does this PR introduce a breaking change?**
13+
14+
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
15+
16+
**What needs to be documented once your changes are merged?**
17+
18+
<!-- List all the information that needs to be added to the documentation after merge -->
19+
<!-- When your changes are merged you will be asked to contribute this to the documentation -->

README.md

+3-179
Original file line numberDiff line numberDiff line change
@@ -1,180 +1,4 @@
1-
# hello-astro
1+
# Hello Tham Website (Astro)
22

3-
Hello Astro is a full featured [Astro](https://astro.build) multi-purpose starter theme written in Typescript and TailwindCSS. It supports Markdown and MDX based pages and blog posts.
4-
5-
![Light](https://github.com/hellotham/hello-astro/raw/main/screenshot-light.png)
6-
7-
![Dark](https://github.com/hellotham/hello-astro/raw/main/screenshot-dark.png)
8-
9-
![Lighthouse](https://github.com/hellotham/hello-astro/raw/main/lighthouse.png)
10-
11-
Hello Astro can used for any/all of the following:
12-
13-
- corporate/marketing site
14-
- blog
15-
- documentation site
16-
- portfolio site supporting photo galleries
17-
18-
Uses the following integrations:
19-
20-
- @astrojs/mdx
21-
- @astrojs/markdoc
22-
- @astrojs/sitemap
23-
- @astrojs/rss
24-
- @astrojs/tailwind
25-
- @astrojs/alpinejs
26-
- astro-icon
27-
- astro-seo
28-
- astro-robots-txt
29-
30-
In addition, SVG and PNG illustrations sourced from [Undraw](https://undraw.co)
31-
32-
This project initially started as a bare bones port of [hello-gatsby-starter](https://github.com/hellotham/hello-gatsby-starter), but now contains more features (light/dark modes, category pages, search, diagrams, math and more!)
33-
34-
## Features
35-
36-
- Full-featured blog with frontmatter (title, description, author, date, image, tags)
37-
- High performance low overhead with minimal Javascript (AlpineJS)
38-
- Full text client based search of blog pages via lunrjs (search index only loaded on first invocation of search on a page)
39-
- Index page and individual pages for authors, categories and tags, including pagination
40-
- Support for RSS feed, sitemap and robots.txt
41-
- SVG design (unDraw, Hero Patterns, Iconify)
42-
- Support for code syntax highlighting
43-
- Full SEO support including Open Graph, Twitter Cards and Schema.org via JSON-LD
44-
- Full support for Light and dark UI modes, as well as following system preferences, in accordance to TailwindCSS recommendation
45-
- Customised 404 error page
46-
- Display math equations using KaTeX via remark-math/rehype-katex (enclosed in `$`...`$` or `$$`...`$$`)
47-
- Display Mermaid, Markmap, PlantUML diagrams (authored as a code block with language `mermaid`, `markmap` and `plantuml`)
48-
- Display map at geo coordinates and zoom level using `Map` component (need to also include `extra: ['map']` is frontmatter to load CSS/JS assets for page)
49-
- Calculates and show reading time for blog posts
50-
- CSS/JS assets of external libraries loaded only when needed on a per page and per package basis - no unnecessary bloat
51-
- Photo gallery and lightbox using PhotoSwipe (including display of EXIF tags)
52-
- Carousel component using Swiper
53-
- Documentation pages (modelled after astro docs starter but using Tailwind)
54-
55-
## External Packages
56-
57-
The start uses the following external packages:
58-
59-
- [Astro](https://astro.build/)
60-
- [TypeScript](https://www.typescriptlang.org/)
61-
- [TailwindCSS](https://tailwindcss.com) and [TailwindUI](https://tailwindui.com)
62-
- [Iconify](https://iconify.design/)
63-
- [Hero Patterns](https://heropatterns.com/)
64-
- [unDraw](https://undraw.co/) for illustrations
65-
- [MDX](https://mdxjs.com/) and [Markdown](https://www.markdownguide.org/)
66-
- [Schema.org](https://schema.org/) and [JSON for Linking Data](https://json-ld.org/), type-checked using [schema-dts](https://github.com/google/schema-dts)
67-
- [Open Graph](https://ogp.me/) used by [Facebook](https://developers.facebook.com/docs/sharing/webmasters/#markup)
68-
- [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards)
69-
- [AlpineJS](https://alpinejs.dev)
70-
- Local full text search using [Lunr](https://lunrjs.com)
71-
- Math equations using [KaTeX](https://katex.org) via [remark-math and rehype-katex](https://github.com/remarkjs/remark-math)
72-
- Diagrams using [Mermaid](https://mermaid-js.github.io/mermaid/#/), [Markmap](https://markmap.js.org) and [PlantUML](https://plantuml.com)
73-
- Open Street Map using [Leaflet](https://leafletjs.com/)
74-
- [reading-time](https://github.com/ngryman/reading-time)
75-
- [PhotoSwipe](https://photoswipe.com)
76-
- [exifr](https://mutiny.cz/exifr/)
77-
- [Swiper](https://swiperjs.com/)
78-
- [Remark Emoji](https://github.com/rhysd/remark-emoji)
79-
80-
It follows the [JAMstack architecture](https://jamstack.org) by automatically building a static version from the Git repository. The demo is deployed on Github Pages.
81-
82-
## 🚀 Project Structure
83-
84-
Inside this starter, you'll see the following folders and files:
85-
86-
```text
87-
/
88-
├── public/
89-
│ └── favicon.ico
90-
├── src/
91-
│ ├── assets/
92-
│ │ ├── image.png
93-
│ │ └── gallery/
94-
│ │ └── gallery-name/
95-
│ │ └── image.jpg
96-
│ ├── components/
97-
│ │ └── header.astro
98-
│ ├── content/
99-
│ │ ├── blog/
100-
│ │ | └── 2022-08-01-post.md
101-
│ │ ├── doc/
102-
│ │ | └── documentation-page.md
103-
| │ └── config.ts
104-
│ ├── layouts/
105-
│ │ ├── base.astro
106-
│ │ ├── blog.astro
107-
│ │ └── doc.astro
108-
│ ├── pages/
109-
│ │ ├── index.astro
110-
│ │ └── contact.astro
111-
│ └── config.ts
112-
└── package.json
113-
```
114-
115-
Astro looks for `.astro`, `.md` or `.mdx` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
116-
117-
`src/components/` is where we put any Astro components and similarly `src/layouts/` for layouts.
118-
119-
Images can be placed in `src/assets/`.
120-
121-
Blog and documentation content are created as collections of Markdown or MDX files in `src/content`.
122-
123-
Any static assets, eg. images, can be placed in the `public/` directory.
124-
125-
## 🧞 Commands
126-
127-
All commands are run from the root of the project, from a terminal:
128-
129-
| Command | Action |
130-
| :------------------ | :------------------------------------------------- |
131-
| `pnpm install` | Installs dependencies |
132-
| `pnpm dev` | Starts local dev server at `localhost:3000` |
133-
| `pnpm build` | Build your production site to `./dist/` |
134-
| `pnpm preview` | Preview your build locally, before deploying |
135-
| `pnpm lint` | Pretty print the source code |
136-
| `pnpm check` | Check the source code for errors | |
137-
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro preview` |
138-
| `pnpm astro --help` | Get help using the Astro CLI |
139-
140-
## Release History
141-
142-
- 1.0.0: Initial Release
143-
- 1.0.1: Moved social images to src, improved coverImage processing
144-
- 1.0.2: Upgrade packages to latest
145-
- 1.1.0: Update to astro v2.x, now works with node 18 and 19
146-
- 2.0.0: New version supporting Astro collections! Also clarified that this is a
147-
multipurpose theme. Search can now include both Markdown and MDX pages!
148-
- 2.0.1: Updated screenshots, and improved landing page.
149-
- 2.1.0: updated to latest packages, fixed dev links, backported features from
150-
personal blog, including Next/Prev links, photo gallery support in Markdown,
151-
and improved pagination control.
152-
- 2.2.0: Fixed lint errors, reimplemented map, lightbox and carousel to use
153-
leaflet, photoswipe and swiper packages instead of relying on external CDN.
154-
- 2.2.1: Update to astro 2.0.10, fixed asset loading issue with base
155-
- 2.3.0: Removed layout from blog and doc content
156-
- 2.4.0:`@astrojs/images` now support `svg` so no need for special handling
157-
- 2.4.1: Use rendered frontmatter for blog and doc posts, fixes issue with diagrams not rendering.
158-
- 2.4.2: Updated packages
159-
- 3.0.0: Major update:
160-
- Use new Astro optimised asset support
161-
- new Astro logo
162-
- optimised post draft filtering
163-
- cleaned up gallery
164-
- fixed up SEO errors
165-
- cleaned up lint errors
166-
- migrated authors and categories to collections and use referential integrity based on Astro 2.5.0
167-
- converted social links to a data collection (requires Astro >2.5.0)
168-
- updated favicon and header metadata
169-
- improve search to include documentation
170-
- 3.1.0: Enhancement update:
171-
- Migrated package manager from yarn to pnpm
172-
- Reference base for head links
173-
- Added eslint and prettier with plugins
174-
- Fixed image attributes error in seo component
175-
- Updated tsconfig to match astro strict
176-
- Update Katex CSS link
177-
- Fixed author not appearing in blog card
178-
- Added Markdoc support
179-
- 3.1.1: Minor update:
180-
- Lazy load images
3+
This is the Hello Tham Corporate Website Static Web App built using the
4+
[Hello Astro](https://github.com/hellotham/hello-astro) starter. This version is deployed on Github Pages.

0 commit comments

Comments
 (0)