@@ -228,235 +228,4 @@ provider = "disqus" # or other providers
2282285 . ** Write good descriptions** for SEO
2292296 . ** Check the Actions tab** if deployment fails
230230
231- That's it! You now have a complete understanding of how to manage your Hugo blog. Happy writing! 🚀
232- # Natural Function Blog - Project Guide
233-
234- This is a Hugo-powered blog using the Stack theme, automatically deployed to GitHub Pages. This guide explains how everything works and how to manage content.
235-
236- ## What This Project Does
237-
238- This is a static blog website that:
239- - Uses ** Hugo** (a fast static site generator) to build the site
240- - Uses the ** Stack theme** for a modern, responsive design
241- - Automatically deploys to ** GitHub Pages** when you push changes
242- - Supports markdown content with math rendering, categories, and tags
243-
244- ## Project Structure
245-
246- ```
247- naturalfunction.github.io/
248- ├── .github/workflows/ # GitHub Actions for auto-deployment
249- │ └── deploy.yml # Deployment workflow
250- ├── assets/ # Theme assets (CSS, JS, images)
251- ├── config/_default/ # Site configuration files
252- │ ├── config.toml # Main site settings (title, URL, etc.)
253- │ ├── params.toml # Theme parameters (sidebar, colors, etc.)
254- │ ├── menu.toml # Navigation menu and social links
255- │ └── ... # Other config files
256- ├── content/ # All your content goes here
257- │ ├── _index.md # Homepage content
258- │ ├── page/ # Static pages
259- │ │ ├── about/ # About page
260- │ │ ├── archives/ # Archives page (auto-generated)
261- │ │ ├── links/ # Resources/links page
262- │ │ └── search/ # Search page (auto-generated)
263- │ ├── post/ # Blog posts
264- │ │ ├── welcome-to-natural-function/
265- │ │ ├── mathematical-functions/
266- │ │ └── ... # Each post in its own folder
267- │ └── categories/ # Category definitions
268- ├── static/ # Static files (images, favicon, etc.)
269- ├── public/ # Generated site (don't edit manually)
270- ├── go.mod & go.sum # Hugo modules (theme management)
271- └── PROJECT_GUIDE.md # This file
272- ```
273-
274- ## How It Works
275-
276- 1 . ** Write Content** : Create markdown files in ` content/ `
277- 2 . ** Push to GitHub** : Commit and push your changes
278- 3 . ** Auto-Deploy** : GitHub Actions builds and deploys your site
279- 4 . ** Live Site** : Your blog updates at ` https://naturalfunction.github.io `
280-
281- ## Adding New Content
282-
283- ### Creating a New Blog Post
284-
285- 1 . Create a new folder in ` content/post/ ` :
286- ```
287- content/post/my-new-post/
288- └── index.md
289- ```
290-
291- 2 . Add front matter and content to ` index.md ` :
292- ``` markdown
293- ---
294- title: "My New Post Title"
295- date: 2025-11-03T10:00:00-06:00
296- description: "Brief description of the post"
297- categories: [ "Mathematics", "Technology"]
298- tags: [ "functions", "algorithms", "patterns"]
299- image: "cover.jpg" # Optional: add cover.jpg to the same folder
300- math: true # Optional: enable math rendering
301- ---
302-
303- # Your Post Content
304-
305- Write your post content here in markdown...
306- ```
307-
308- 3 . Commit and push - your post will be live in minutes!
309-
310- ### Creating a New Page
311-
312- 1 . Create a folder in ` content/page/ ` :
313- ```
314- content/page/my-page/
315- └── index.md
316- ```
317-
318- 2 . Add front matter and content:
319- ``` markdown
320- ---
321- title: "My Page"
322- description: "Page description"
323- menu:
324- main:
325- weight: 5
326- params:
327- icon: page
328- ---
329-
330- # Page Content
331- ```
332-
333- ### Adding Images
334-
335- 1 . ** For blog posts** : Put images in the same folder as your post
336- ```
337- content/post/my-post/
338- ├── index.md
339- ├── cover.jpg # Featured image
340- └── diagram.png # Images used in the post
341- ```
342-
343- 2 . ** For site-wide images** : Put them in ` static/ `
344- ```
345- static/
346- ├── favicon.png
347- └── img/
348- └── avatar.png
349- ```
350-
351- ## Editing Existing Content
352-
353- ### Updating Site Information
354-
355- - ** Site title/URL** : Edit ` config/_default/config.toml `
356- - ** Sidebar info** : Edit ` config/_default/params.toml `
357- - ** Navigation menu** : Edit ` config/_default/menu.toml `
358- - ** Homepage** : Edit ` content/_index.md `
359- - ** About page** : Edit ` content/page/about/index.md `
360-
361- ### Updating Posts
362-
363- Simply edit the markdown files in ` content/post/[post-name]/index.md `
364-
365- ### Managing Categories
366-
367- 1 . Create category definitions in ` content/categories/ ` :
368- ```
369- content/categories/mathematics/
370- └── _index.md
371- ```
372-
373- 2 . Add category info:
374- ``` markdown
375- ---
376- title: Mathematics
377- description: Posts about mathematical concepts
378- style:
379- background: "#2a9d8f"
380- color: "#fff"
381- ---
382- ```
383-
384- ## Markdown Features
385-
386- The Stack theme supports rich markdown:
387-
388- - ** Math** : Use ` $inline math$ ` or ` $$block math$$ ` (when ` math: true ` )
389- - ** Code blocks** : Use triple backticks with language
390- - ** Images** : `  `
391- - ** Links** : ` [text](url) `
392- - ** Tables, lists, quotes** : Standard markdown syntax
393-
394- ## Deployment
395-
396- The site automatically deploys when you:
397- 1 . Push changes to the ` main ` branch
398- 2 . GitHub Actions runs the build process
399- 3 . Site updates at ` https://naturalfunction.github.io `
400-
401- You can monitor deployments at:
402- ` https://github.com/naturalfunction/naturalfunction.github.io/actions `
403-
404- ## Local Development (Optional)
405-
406- To preview changes locally before pushing:
407-
408- 1 . Install Hugo: ` brew install hugo ` (macOS)
409- 2 . Run local server: ` hugo server `
410- 3 . View at: ` http://localhost:1313 `
411-
412- ## Common Tasks
413-
414- ### Change Site Title
415- Edit ` config/_default/config.toml ` :
416- ``` toml
417- title = " Your New Title"
418- ```
419-
420- ### Update Sidebar
421- Edit ` config/_default/params.toml ` :
422- ``` toml
423- [sidebar ]
424- emoji = " 🧮"
425- subtitle = " Your new subtitle"
426- ```
427-
428- ### Add Social Links
429- Edit ` config/_default/menu.toml ` :
430- ``` toml
431- [[social ]]
432- identifier = " github"
433- name = " GitHub"
434- url = " https://github.com/yourusername"
435- [social .params ]
436- icon = " brand-github"
437- ```
438-
439- ### Enable Comments
440- Edit ` config/_default/params.toml ` :
441- ``` toml
442- [comments ]
443- enabled = true
444- provider = " disqus" # or other providers
445- ```
446-
447- ## Getting Help
448-
449- - ** Hugo Documentation** : https://gohugo.io/documentation/
450- - ** Stack Theme Docs** : https://stack.jimmycai.com/
451- - ** Markdown Guide** : https://www.markdownguide.org/
452-
453- ## Tips
454-
455- 1 . ** Always test locally** if you have Hugo installed
456- 2 . ** Use descriptive filenames** for posts and images
457- 3 . ** Add alt text** to images for accessibility
458- 4 . ** Use categories and tags** to organize content
459- 5 . ** Write good descriptions** for SEO
460- 6 . ** Check the Actions tab** if deployment fails
461-
462231That's it! You now have a complete understanding of how to manage your Hugo blog. Happy writing! 🚀
0 commit comments