Site Management¶
The SDK provides functionality to retrieve and update your site's basic information such as name, domain, contact details, and other site-specific configurations such as northstar, business info, website info, and design system.
Getting Site Information¶
import konigle
client = konigle.Client(api_key="your-api-key")
# Get current site information
site = client.website.get()
print(f"Site Name: {site.name}")
print(f"Domain: {site.domain}")
print(f"UID: {site.uid}")
print(f"Password Protection: {site.password_enabled}")
# Access contact information (available in detail view)
if site.address1:
print(f"Address: {site.address1}")
if site.city and site.country:
print(f"Location: {site.city}, {site.country}")
if site.phone:
print(f"Phone: {site.phone}")
if site.email:
print(f"Email: {site.email}")
# Access additional site details
if site.currency:
print(f"Currency: {site.currency}")
if site.plan_name:
print(f"Plan: {site.plan_name}")
Updating Site Information¶
from konigle.models.core.site import SiteUpdate
# Update site information
site_update = SiteUpdate(
name="My Updated Site Name",
address1="123 Business Street",
address2="Suite 100",
city="San Francisco",
country="United States",
province="California",
phone="+1 (555) 123-4567"
)
updated_site = client.website.update(site_update)
print("✅ Site updated successfully")
print(f"Updated name: {updated_site.name}")
You can update any combination of the following site fields:
name: Site nameaddress1: Primary address lineaddress2: Secondary address linecity: Citycountry: Countryprovince: Province or statephone: Contact phone number
Business Northstar Management¶
The business northstar includes comprehensive business information, branding, tone, goals, target audience, and strategic direction. This serves as the foundational document that guides all business decisions and communications.
The northstar content is used by Konigle AI to align website content and strategies with your business objectives.
Getting Business Northstar¶
import konigle
client = konigle.Client(api_key="your-api-key")
# Get current business northstar
northstar = client.website.get_northstar()
print(northstar)
Setting Business Northstar¶
# Define business northstar in markdown
northstar_md = """
# Business Northstar
## Mission Statement
To revolutionize how businesses connect with their customers through innovative
technology solutions that drive meaningful engagement and sustainable growth.
## Vision
To become the leading platform that empowers businesses of all sizes to build
authentic relationships with their customers and achieve unprecedented success.
## Core Values
- **Innovation**: We continuously push boundaries to create cutting-edge solutions
- **Authenticity**: We believe in genuine connections and transparent communication
- **Excellence**: We strive for perfection in everything we deliver
- **Empowerment**: We enable our clients to achieve more than they thought possible
## Brand Personality
- **Professional**: Sophisticated and trustworthy in all interactions
- **Innovative**: Forward-thinking and technology-driven
- **Approachable**: Friendly and accessible to businesses of all sizes
- **Results-focused**: Committed to delivering measurable outcomes
## Target Audience
### Primary Audience
- Small to medium-sized business owners (25-55 years)
- Marketing professionals and digital marketers
- Entrepreneurs launching new ventures
- E-commerce business owners
### Secondary Audience
- Enterprise marketing teams
- Marketing agencies
- Business consultants
- Technology adopters and early innovators
## Brand Voice and Tone
- **Confident but not arrogant**: We know our expertise but remain humble
- **Helpful and educational**: We guide and teach rather than just sell
- **Clear and direct**: We communicate complex ideas in simple terms
- **Encouraging and supportive**: We celebrate our clients' successes
## Strategic Goals
### Short-term (6-12 months)
- Increase customer acquisition by 40%
- Improve customer retention rate to 85%
- Launch 3 new product features based on customer feedback
- Expand into 2 new market segments
### Long-term (2-3 years)
- Become the top choice for business growth platforms
- Establish partnerships with major e-commerce platforms
- Build a community of 100,000+ active users
- Achieve sustainable profitability and market leadership
## Competitive Advantages
- **User-friendly interface**: Intuitive design that requires minimal learning curve
- **Comprehensive feature set**: All-in-one solution for business growth needs
- **Personalized support**: Dedicated customer success team for each client
- **Data-driven insights**: Advanced analytics and reporting capabilities
- **Scalable solutions**: Grows with your business needs
## Key Messaging Pillars
1. **Simplicity**: "Complex business growth made simple"
2. **Results**: "Proven strategies that deliver measurable results"
3. **Partnership**: "Your success is our success"
4. **Innovation**: "Tomorrow's business solutions, available today"
"""
# Update business northstar
client.website.set_northstar(northstar_md)
print("✅ Business northstar updated")
Business Information Management¶
Business information typically includes details about your company, such as its name, address, contact information, mission statement, and other relevant data that helps visitors understand your business.
Getting Business Information¶
import konigle
client = konigle.Client(api_key="your-api-key")
# Get current business information
business_info = client.website.get_business_info()
print(business_info)
Setting Business Information¶
# Define business information in markdown
business_info_md = """
# About Our Company
## Company Overview
We are a leading technology company specializing in innovative solutions for
modern businesses.
## Mission Statement
To empower businesses with cutting-edge technology and exceptional service.
## Core Values
- **Innovation**: We constantly push the boundaries of what's possible
- **Quality**: We deliver excellence in everything we do
- **Customer Focus**: Our customers' success is our success
## Contact Information
- **Address**: 123 Tech Street, Innovation City, IC 12345
- **Phone**: +1 (555) 123-4567
- **Email**: info@company.com
- **Website**: https://www.company.com
## Business Hours
- Monday - Friday: 9:00 AM - 6:00 PM
- Saturday: 10:00 AM - 4:00 PM
- Sunday: Closed
"""
# Update business information
client.website.set_business_info(business_info_md)
print("✅ Business information updated")
Website Information Management¶
Website information includes details about website's objective, what are the key pages or features it contains, target audience, and any other relevant information that helps Konigle AI understand the purpose and structure of your website.
Getting Website Information¶
# Get current website information
website_info = client.website.get_website_info()
print(website_info)
Setting Website Information¶
# Define website configuration in markdown
website_info_md = """
Tell us about your website, its purpose, target audience, and key features.
"""
# Update website information
client.website.set_website_info(website_info_md)
print("✅ Website information updated")
Design System Management¶
The design system information stores details about your website's design language, including typography, component guidelines, and design principles. This helps maintain design consistency across your website.
Sicne the website uses TailwindCSS v4, the design system can also include TailwindCSS classes and guidelines as shown in the sample design system below.
Getting Design System Information¶
# Get current design system information
design_system = client.website.get_design_system()
print(design_system)
Setting Design System Information¶
# Define design system in markdown
design_system_md = """
# Website Design System Components
## Brand Direction
Primary Concept: Commanding narrative showcase that demonstrates expertise
through strategic storytelling Business Type: Professional portfolio (creative
director, architect, consultant, executive) Target Audience: Industry
professionals, potential clients, 35-65 years, values substance and proven
results Brand Personality: Confident, sophisticated, authoritative, strategic,
impactful, discerning
## Color Usage
- Primary: High-impact elements, call-to-actions, key highlights, navigation
active states
- Secondary: Supporting content areas, subheadings, background sections,
complementary elements
- Accent: Critical emphasis points, success indicators, interactive hover
states, progress markers
## Typography System
Hierarchy:
- Hero Title: text-5xl md:text-6xl lg:text-7xl font-black leading-none
- Section Headings: text-3xl md:text-4xl lg:text-5xl font-bold leading-tight
- Subsection Headings: text-xl md:text-2xl lg:text-3xl font-bold leading-snug
- Body Text: text-lg md:text-xl leading-relaxed font-normal
- Small Text: text-base md:text-lg leading-normal font-medium
- Button Text: text-lg font-bold tracking-wider uppercase
Character Limits:
- Headlines: 40 characters max
- Subheadings: 60 characters max
- Paragraphs: 80-90 characters per line
## Spacing System
Typography Spacing:
- Title to subtitle: space-y-6 md:space-y-8
- Subtitle to body text: space-y-6 md:space-y-10
- Paragraph spacing: space-y-6 md:space-y-8
- List item spacing: space-y-3 md:space-y-4
Element margins: space-y-4 md:space-y-6 lg:space-y-8 Section padding: py-16
md:py-20 lg:py-24 Page sections: space-y-20 md:space-y-24 lg:space-y-32
Container behavior: max-w-7xl mx-auto px-6 md:px-8 lg:px-12
## Layout System
Grid: 12-column system with flexible breakpoints Container: max-w-7xl mx-auto
with generous side padding Gutters: gap-8 md:gap-12 lg:gap-16
Layout Personality: "Epic Narrative"
Signature Elements:
- Full-viewport story sections with dramatic reveals
- Diagonal content flows and asymmetrical compositions
- Large-scale typography that commands attention
- Strategic white space for dramatic emphasis
- Progressive disclosure of achievements and expertise
Section Templates:
- Hero: Full-screen impact with bold typography and compelling imagery
- Story Chapters: Sequential narrative blocks with varied layouts and pacing
- Showcase: Large-format project displays with detailed storytelling
- Credentials: Achievement highlights with substantial visual weight
- Contact: Confident closing with clear next steps
## Component System
Buttons:
- Primary: bg-primary text-primary-content px-8 py-4 md:px-12 md:py-6 font-bold
text-lg tracking-wider uppercase hover:scale-105 transition-all duration-300
- Secondary: border-4 border-primary text-primary bg-transparent px-8 py-4
md:px-12 md:py-6 font-bold text-lg tracking-wider uppercase hover:bg-primary
hover:text-primary-content transition-all duration-300
- Special: bg-accent text-accent-content px-10 py-5 md:px-14 md:py-7 font-black
text-xl tracking-widest
Cards:
- Background: bg-secondary text-secondary-content with high contrast borders
- Border: border-l-8 border-primary for emphasis and hierarchy
- Padding: p-8 md:p-12 lg:p-16 for substantial presence
- Shadow: shadow-2xl hover:shadow-3xl for dramatic depth
Forms:
- Input: w-full px-6 py-4 md:px-8 md:py-6 text-lg border-4 border-secondary
focus:border-primary bg-transparent
- Label: text-lg md:text-xl font-bold text-secondary mb-4 tracking-wide
- Container: space-y-8 md:space-y-10 with bold visual hierarchy
## Motion and Interaction System
Transition Timing:
- Fast: 200ms for immediate feedback elements
- Standard: 400ms for content transitions and reveals
- Slow: 800ms for dramatic section entrances and storytelling
Easing: cubic-bezier(0.25, 0.46, 0.45, 0.94) for confident, purposeful movement
Unique Animations:
- Staggered section reveals as user scrolls through the narrative
- Bold scale transforms on hover for interactive elements
- Parallax storytelling with content layers moving at different speeds
- Progressive typography reveals for dramatic impact
Interaction Personality: Commanding and substantial with purposeful weight to
every interaction
## Content Guidelines
Tone of Voice: Authoritative, strategic, results-focused, confident Writing
Style: Direct impact statements with strategic narrative flow
Headlines: Achievement and transformation-focused
- "Transforming [Industry] Through Strategic [Expertise]"
- "20 Years of [Specific Impact] Results"
- "From Challenge to [Quantified Success]"
Descriptions: Results-driven with specific achievements
- Lead with quantifiable outcomes and transformations
- Use power words: achieved, transformed, delivered, exceeded, pioneered
- Focus on strategic thinking and substantial impact
Call-to-Actions:
- "Discuss Your Next Challenge"
- "Explore Strategic Partnership"
- "Schedule Executive Consultation"
- "Review Case Studies"
- "Begin Transformation"
## Image and Visual System
Photography Style: High-contrast, professional, documentary-style with dramatic
lighting Color Treatment: Bold saturation with strategic desaturation for
emphasis Aspect Ratios: 16:9 for landscapes, 4:3 for portraits, 21:9 for
cinematic storytelling
Image Categories:
- Hero: Dramatic, full-viewport images that establish authority and context
- Projects: Before/after transformations and process documentation
- Professional: Executive portraits with strong lighting and confident posing
- Process: Behind-the-scenes strategic work and collaboration moments
Visual Personality: Substantial and commanding with strategic use of negative
space
## Iconography
- Icon Style: Bold filled icons with substantial stroke weight (3-4px minimum)
- Icon Sizes: 32px, 48px, 64px, 96px for hierarchical emphasis
- Icon Usage: Strategic placement for navigation, achievements, and process
visualization with high contrast
"""
# Update design system information
client.website.set_design_system(design_system_md)
print("✅ Design system information updated")
Website Settings Management¶
The SDK provides access to your website's configuration settings. These settings include various site-wide configurations and preferences that control how your website operates.
Getting Website Settings¶
import konigle
client = konigle.Client(api_key="your-api-key")
# Get current website settings
settings = client.website.get_settings()
print(f"Website settings: {settings}")
Robots.txt Management¶
The robots.txt file is a standard used by websites to communicate with web crawlers and search engine bots. It specifies which areas of your website should or should not be crawled and indexed.
Getting Robots.txt Content¶
import konigle
client = konigle.Client(api_key="your-api-key")
# Get current robots.txt content
robots_content = client.website.get_robots_txt()
if robots_content:
print(robots_content)
else:
print("robots.txt is not set. Default rules apply.")
Setting Robots.txt Content¶
# Define robots.txt content
robots_txt = """User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /public/
User-agent: Googlebot
Allow: /
Sitemap: https://www.example.com/sitemap.xml
"""
# Update robots.txt
page = client.website.set_robots_txt(robots_txt)
print("✅ robots.txt updated successfully")
The set_robots_txt() method automatically creates the robots.txt page if it
doesn't exist, or updates it if it already exists. The page is automatically
published and excluded from the sitemap.
URL Management¶
The SDK provides URL management functionality for adding and retrieving URLs from your website. This allows you to create new pages and folders that are nested without needing to know whether the URLs already exist.
Adding URLs¶
# Add a new page URL. This does not create new url if it already exists.
result = client.website.add_url("/about", "page")
print(f"✅ Page URL added: {result}")
# Add a new folder URL. This does not create new url if it already exists.
result = client.website.add_url("/blog", "folder")
print(f"✅ Folder URL added: {result}")
# Default type is "page" if not specified
result = client.website.add_url("/contact")
print(f"✅ URL added: {result}")
Note that this just adds the URL to the website structure. The page content and other metadata need to be managed separately using appropriate APIs.
Getting URL Details¶
# Get URL details
url_details = client.website.get_url("/about")
print(f"URL details: {url_details}")
# Get URL details for a specific version
url_details = client.website.get_url("/about", version="B")
print(f"URL details for version v2: {url_details}")
CLI Usage¶
Use the CLI for quick website information management:
# Get business northstar
konigle website get-northstar
# Save northstar to file
konigle website get-northstar --output northstar.md
# Update northstar from string
konigle website set-northstar --content "# Business Northstar\nOur mission is to..."
# Update northstar from file
konigle website set-northstar --file northstar.md
# Get business information
konigle website get-business-info
# Save business info to file
konigle website get-business-info --output business.md
# Update business info from string
konigle website set-business-info --content "# Our Company\nWe build amazing software."
# Update business info from file
konigle website set-business-info --file business-info.md
# Get website information
konigle website get-website-info
# Save website info to file
konigle website get-website-info --output website-config.md
# Update website info from string
konigle website set-website-info --content "# Site Config\nDomain: example.com"
# Update website info from file
konigle website set-website-info --file website-config.md
# Get design system information
konigle website get-design-system
# Save design system to file
konigle website get-design-system --output design-system.md
# Update design system from string
konigle website set-design-system --content "# Design System\nColors: blue, white"
# Update design system from file
konigle website set-design-system --file design-system.md
# Add a URL to the website
konigle website add-url /about --type page
# Add a folder URL
konigle website add-url /blog --type folder
# Add URL (defaults to page type)
konigle website add-url /contact
# Get URL details
konigle website get-url /about
# Get URL details for specific version
konigle website get-url /about --version B
# Get current site information
konigle website get
# Get website settings
konigle website get-settings
# Get robots.txt content
konigle website get-robots-txt
# Save robots.txt to file
konigle website get-robots-txt --output robots.txt
# Update robots.txt from string
konigle website set-robots-txt --content "User-agent: *\nDisallow: /admin/"
# Update robots.txt from file
konigle website set-robots-txt --file robots.txt
# Update site information
konigle website update --name "My New Site Name"
# Update multiple site fields
konigle website update --name "Updated Site" --city "New York" --phone "+1-555-0123"
# Update address information
konigle website update --address1 "123 Main St" --address2 "Suite 100" --city "Boston" --country "USA" --province "Massachusetts"
Async Operations¶
import asyncio
async def manage_website_info():
async with konigle.AsyncClient(api_key="your-api-key") as client:
# Get current site information
site = await client.website.get()
print(f"Current site: {site.name} ({site.domain})")
# Update site information if needed
from konigle.models.core.site import SiteUpdate
site_update = SiteUpdate(
name="Updated Site Name",
city="San Francisco",
phone="+1 (555) 123-4567"
)
updated_site = await client.website.update(site_update)
print(f"✅ Site updated: {updated_site.name}")
# Get current information
northstar = await client.website.get_northstar()
business_info = await client.website.get_business_info()
website_info = await client.website.get_website_info()
design_system = await client.website.get_design_system()
# Update northstar information
updated_northstar = f"""
{northstar}
## Last Updated
{datetime.now().isoformat()}
## Recent Changes
- Updated strategic goals
- Refined target audience
- Enhanced brand messaging
"""
await client.website.set_northstar(updated_northstar)
# Update business information
new_business_info = f"""
# Updated Business Information
Last updated: {datetime.now().isoformat()}
{business_info}
## Recent Updates
- Added new contact information
- Updated business hours
"""
await client.website.set_business_info(new_business_info)
# Update website information
updated_website_info = website_info + "\n\n## Last Modified\n" + datetime.now().isoformat()
await client.website.set_website_info(updated_website_info)
# Update design system
updated_design_system = design_system + "\n\n## Last Updated\n" + datetime.now().isoformat()
await client.website.set_design_system(updated_design_system)
# Add new URLs
await client.website.add_url("/new-page", "page")
await client.website.add_url("/new-section", "folder")
# Get URL details
about_page = await client.website.get_url("/about")
print(f"About page details: {about_page}")
# Manage robots.txt
current_robots = await client.website.get_robots_txt()
if current_robots:
print(f"Current robots.txt: {current_robots}")
# Update robots.txt
new_robots_txt = """User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /
Sitemap: https://www.example.com/sitemap.xml
"""
await client.website.set_robots_txt(new_robots_txt)
print("✅ robots.txt updated")
print("✅ All website information updated")
asyncio.run(manage_website_info())